lkml.org 
[lkml]   [2020]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC 3/5] mm, page_alloc(): remove setup_pageset()
From
Date
On 9/10/20 11:23 AM, Oscar Salvador wrote:
> On Mon, Sep 07, 2020 at 06:36:26PM +0200, Vlastimil Babka wrote:
>> We initialize boot-time pagesets with setup_pageset(), which sets high and
>> batch values that effectively disable pcplists.
>>
>> We can remove this wrapper if we just set these values for all pagesets in
>> pageset_init(). Non-boot pagesets then subsequently update them to specific
>> values.
>>
>> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
>
> Reviewed-by: Oscar Salvador <osalvador@suse.de>

Thanks!

> Just one question below:
>
>> -static void setup_pageset(struct per_cpu_pageset *p)
>> -{
>> - pageset_init(p);
>> - pageset_update(&p->pcp, 0, 1);
>> + /*
>> + * Set batch and high values safe for a boot pageset. Proper pageset's
>> + * initialization will update them.
>> + */
>> + pcp->high = 0;
>> + pcp->batch = 1;
>
> pageset_update was manipulating these values with barriers in between.
> I guess we do not care here because we are not really updating but
> initializing them, right?

Sure. We just initialized all the list heads, so there can be no concurrent
access at this point. But I'll mention it in the comment.


\
 
 \ /
  Last update: 2020-09-18 11:38    [W:0.075 / U:5.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site