|
Message-ID: <e7a0789e-585c-839d-d8ea-95b1c9aef38a@hpe.com>
Date: Mon, 5 Sep 2016 13:54:47 +0200
From: Juerg Haefliger <juerg.haefliger@....com>
To: Dave Hansen <dave.hansen@...el.com>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, kernel-hardening@...ts.openwall.com,
linux-x86_64@...r.kernel.org
Cc: vpk@...columbia.edu
Subject: Re: [RFC PATCH v2 2/3] xpfo: Only put previous userspace pages into
the hot cache
On 09/02/2016 10:39 PM, Dave Hansen wrote:
> On 09/02/2016 04:39 AM, Juerg Haefliger wrote:
>> Allocating a page to userspace that was previously allocated to the
>> kernel requires an expensive TLB shootdown. To minimize this, we only
>> put non-kernel pages into the hot cache to favor their allocation.
>
> But kernel allocations do allocate from these pools, right?
Yes.
> Does this
> just mean that kernel allocations usually have to pay the penalty to
> convert a page?
Only pages that are allocated for userspace (gfp & GFP_HIGHUSER == GFP_HIGHUSER) which were
previously allocated for the kernel (gfp & GFP_HIGHUSER != GFP_HIGHUSER) have to pay the penalty.
> So, what's the logic here? You're assuming that order-0 kernel
> allocations are more rare than allocations for userspace?
The logic is to put reclaimed kernel pages into the cold cache to postpone their allocation as long
as possible to minimize (potential) TLB flushes.
...Juerg
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.