All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: Vasileios Almpanis <vasileios.almpanis@virtuozzo.com>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1 1/2] mm/memcontrol: allocate numa_migrate targets of the source folio order
Date: Wed, 28 Oct 2026 15:14:25 +0100	[thread overview]
Message-ID: <43815f61-53bb-40f4-8da1-0113b2d28edc@virtuozzo.com> (raw)
In-Reply-To: <179319299768.343268.1788849324039542699.b4-review@b4>

On 10/28/26 14:09, Vasileios Almpanis wrote:
...
>> +++ b/mm/memcontrol.c
>> @@ -3480,6 +3480,7 @@ static struct folio *memcg_numa_migrate_new_folio(struct folio *old_folio,
>>  {
>>  	struct memcg_numa_migrate_struct *ms = (void *)private;
>>  	gfp_t gfp_mask = GFP_HIGHUSER_MOVABLE | __GFP_NORETRY | __GFP_NOWARN;
>> +	unsigned int order = 0;
>>  
>>  	ms->current_node = next_node(ms->current_node, *ms->target_nodes);
>>  	if (ms->current_node >= MAX_NUMNODES) {
>> @@ -3487,13 +3488,13 @@ static struct folio *memcg_numa_migrate_new_folio(struct folio *old_folio,
>>  		VM_BUG_ON(ms->current_node >= MAX_NUMNODES);
>>  	}
>>  
>> -	if (thp_migration_supported() && folio_test_large(old_folio)) {
>> -		return __folio_alloc(GFP_TRANSHUGE_LIGHT | __GFP_THISNODE,
>> -				HPAGE_PMD_ORDER, ms->current_node,
>> -				ms->target_nodes);
>> +	if (folio_test_large(old_folio)) {
>> +		gfp_mask = GFP_TRANSHUGE_LIGHT | __GFP_THISNODE;
>> +		order = folio_order(old_folio);
>>  	}
>>  
>> -	return __folio_alloc(gfp_mask, 0, ms->current_node, ms->target_nodes);
>> +	return __folio_alloc(gfp_mask, order, ms->current_node,
>> +			     ms->target_nodes);
> 
> The patch looks good to me. There is another issue that is about parsing and
> has nothing to do with this patch but I though of bringing it up. If we
> write an empty nodelist to memory.numa_migrate it will get past
> nodes_subset. memcg_numa_migrate_new_folio will pass MAX_NUMNODES to
> __folio_alloc and will cause OOB. We need another patch that adds
> nodes_empty next to nodes_subset.

Thank you, will think about this in a separate patch(set).

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

  reply	other threads:[~2026-10-28 14:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28 12:22 [Devel] [PATCH hci-8.1 0/2] mm/memcontrol: numa_migrate destinations " Konstantin Khorenko
2026-10-28 12:22 ` [Devel] [PATCH hci-8.1 1/2] mm/memcontrol: allocate numa_migrate targets " Konstantin Khorenko
2026-10-28 12:26   ` no-reply
2026-10-28 13:09   ` Vasileios Almpanis
2026-10-28 14:14     ` Konstantin Khorenko [this message]
2026-10-28 12:22 ` [Devel] [PATCH hci-8.1 2/2] selftests/ve: check memory.numa_migrate keeps the " Konstantin Khorenko
2026-10-28 12:28   ` no-reply
2026-10-28 12:49   ` Pavel Tikhomirov
2026-10-28 14:08     ` Konstantin Khorenko
2026-10-28 13:09   ` Vasileios Almpanis
2026-10-28 14:12     ` Konstantin Khorenko
2026-10-28 12:49 ` [Devel] [PATCH hci-8.1 0/2] mm/memcontrol: numa_migrate destinations of the source " Pavel Tikhomirov
2026-10-28 13:09 ` Vasileios Almpanis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43815f61-53bb-40f4-8da1-0113b2d28edc@virtuozzo.com \
    --to=khorenko@virtuozzo.com \
    --cc=devel@openvz.org \
    --cc=vasileios.almpanis@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.