[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1d7573c0-ebbc-6ed2-f152-1045eb0542f9@os.amperecomputing.com>
Date: Fri, 15 Sep 2023 09:30:26 -0700 (PDT)
From: "Lameter, Christopher" <cl@...amperecomputing.com>
To: Dave Hansen <dave.hansen@...el.com>
cc: Matteo Rizzo <matteorizzo@...gle.com>, penberg@...nel.org,
rientjes@...gle.com, iamjoonsoo.kim@....com,
akpm@...ux-foundation.org, vbabka@...e.cz,
roman.gushchin@...ux.dev, 42.hyeyoo@...il.com,
keescook@...omium.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, linux-mm@...ck.org,
linux-hardening@...r.kernel.org, tglx@...utronix.de,
mingo@...hat.com, bp@...en8.de, dave.hansen@...ux.intel.com,
x86@...nel.org, hpa@...or.com, corbet@....net, luto@...nel.org,
peterz@...radead.org, jannh@...gle.com, evn@...gle.com,
poprdi@...gle.com, jordyzomer@...gle.com
Subject: Re: [RFC PATCH 00/14] Prevent cross-cache attacks in the SLUB
allocator
On Fri, 15 Sep 2023, Dave Hansen wrote:
> On 9/15/23 03:59, Matteo Rizzo wrote:
>> The goal of this patch series is to deterministically prevent cross-cache
>> attacks in the SLUB allocator.
>
> What's the cost?
The only thing that I see is 1-2% on kernel compilations (and "more on
machines with lots of cores")?
Having a virtualized slab subsystem could enable other things:
- The page order calculation could be simplified since vmalloc can stitch
arbitrary base pages together to form larger contiguous virtual segments.
So just use f.e. order 5 or so for all slabs to reduce contention?
- Maybe we could make slab pages movable (if we can ensure that slab
objects are not touched somehow. At least stop_machine run could be used
to move batches of slab memory)
- Maybe we can avoid allocating page structs somehow for slab memory?
Looks like this is taking a step into that direction. The metadata storage
of the slab allocator could be reworked and optimized better.
Problems:
- Overhead due to more TLB lookups
- Larger amounts of TLBs are used for the OS. Currently we are trying to
use the maximum mappable TLBs to reduce their numbers. This presumably
means using 4K TLBs for all slab access.
- Memory may not be physically contiguous which may be required by
some drivers doing DMA.
Powered by blists - more mailing lists