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

Vladimir Davydov vdavydov at virtuozzo.com
Wed Nov 18 08:07:09 PST 2015


On Wed, Nov 18, 2015 at 07:12:10PM +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.

I don't think it's worth it. Surely you avoid adding new functions to
mm/page_alloc.c, but in return you have to patch mm/internal.h and
mm/Makefile, and you patch mm/page_alloc.c anyway. But I don't do
rebases, so up to Konstantin. The patch itself should compile and work
as expected AFAICS.


More information about the Devel mailing list