Re: [PATCH 4/4] add ksm kernel shared memory driver.

Andrea Arcangeli
2009-04-18T14:59:49Z

On Tue, Apr 14, 2009 at 03:09:29PM -0700, Andrew Morton wrote:
> We need a comment here explaining why we can't use the much preferable
> lock_page().
>
> Why can't we use the much preferable lock_page()?

We might but then it'd risk to waste time waiting. It's not worth
waiting, we want kksmd to be allowed to keep one (in future more than
one as we scale it smp/numa) CPU busy at all times running memcmp and
not schedule (other than for need_resched()) to try to free memory at
the fastest peace possible.