[Devel] [PATCH rh7 v2] x86: "pages zeroing on free" option introduced

Stanislav Kinsburskiу skinsbursky at odin.com
Thu Nov 19 01:18:16 PST 2015


19 нояб. 2015 г. 10:05 AM пользователь Vladimir Davydov <vdavydov at virtuozzo.com> написал:
>
> On Wed, Nov 18, 2015 at 08:31:03PM +0400, Stanislav Kinsburskiy wrote: 
> > This patch add pages zeroing option to free_pages_prepare(). 
> > It's disabled by default. To enable it one should add "zero-free-pages" 
> > kernel option to kernel boot parameters. 
> > Note, that kernel boot option handling and enabling of pages zeroing are 
> > divided. The reason for this is that static keys initialization can't be 
> > performed during kernel parameters parsing (can't specify, what is the exact 
> > reason, but kernel just doesn't boot, if static key is incremented on 
> > parameter callback). Because of this split, actual zeroing is enabled later 
> > during kernel boot, but still early enough. 
>
> > Another thing to notice, is that code is moved to a separate source file. 
> > The reason for this is to simplify rebases in future. 
>
> The last paragraph isn't true anymore :-) 
>
> > 
> > https://jira.sw.ru/browse/PSBM-33071 
> > 
> > v2: All the code was moved to mm/pages_alloc.c 
>
> Yeah, I like this more. 
>
> Reviewed-by: Vladimir Davydov <vdavydov at virtuozzo.com> 
>
> Come to think of it, with jump labels we can make it possible to flip 
> this feature at runtime via sysctl, but it's surely beyond the scope of 
> this patch. 

I don't think it a good idea.
And the major reason (besides one more useless and obfuscating sysctl) is migration.
In rhel6 you were using cpu features bit. Here we don't have one. And comparing cmdlines is the best solution I see so far.



More information about the Devel mailing list