lkml.org 
[lkml]   [2021]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC][PATCH 08/13] mm/migrate: demote pages during reclaim
From
Date
On 2/2/21 10:22 AM, Yang Shi wrote:
>> +static struct page *alloc_demote_page(struct page *page, unsigned long node)
>> +{
>> + struct migration_target_control mtc = {
>> + /*
>> + * Fail quickly and quietly. Page will likely
>> + * just be discarded instead of migrated.
>> + */
>> + .gfp_mask = GFP_HIGHUSER | __GFP_NORETRY | __GFP_NOWARN,
>> + .nid = node
>> + };
>> +
>> + return alloc_migration_target(page, (unsigned long)&mtc);
> Other than the gfp flag question raised by Oscar, I'm wondering how we
> guarantee the demotion allocation happens on the designated node. In
> the previous version __GFP_THISNODE is set to guarantee this. In this
> version you switched to use alloc_migration_target() API but without
> having nodemask or __GFP_THISNODE. If nodemask is NULL the allocation
> may fall back to an unexpected node.
>
> And GFP_HIGHUSER does respect cpuset, so if the demotion target node
> is excluded by the cpuset which the task belongs to, the migration
> would fail. This might be a way to respect cpuset, but it should just
> work for direct reclaimer. So, is this change really expected?

No, that wasn't intended. I'll restore __GFP_THISNODE. Thanks for
noting this.

\
 
 \ /
  Last update: 2021-02-02 19:37    [W:0.097 / U:1.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site