Re: [RFC v2 PATCH 0/4] speed up page allocation for __GFP_ZERO

From: Daniel Jordan
Date: Tue Dec 22 2020 - 12:12:40 EST


Liang Li <liliang.opensource@xxxxxxxxx> writes:
> The first version can be found at: https://lkml.org/lkml/2020/4/12/42
>
> Zero out the page content usually happens when allocating pages with
> the flag of __GFP_ZERO, this is a time consuming operation, it makes
> the population of a large vma area very slowly. This patch introduce
> a new feature for zero out pages before page allocation, it can help
> to speed up page allocation with __GFP_ZERO.

kzeropaged appears to escape some of the kernel's resource controls, at
least if I'm understanding this right.

The heavy part of a page fault is moved out of the faulting task's
context so the CPU controller can't throttle it. A task that uses
these pages can benefit from clearing done by CPUs that it's not allowed
to run on. How can it handle these cases?