tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Adding pool_cache_invalidate_local() to pool_cache(9) API
On Fri, Oct 09, 2009 at 12:28:56AM -0700, Jason Thorpe wrote:
> [...] If per-CPU cached copies are not included in that, then a subsequent
> allocation could return an incorrectly-constructed object, leading to errant
> behavior. There are subsystems in the kernel that depend on the
> pool_cache_invalidate() semantics I describe; see
> arch/alpha/alpha/pmap.c:pmap_growkernel() for an example. The L1 PTPs are
> cached in constructed form (with the L1 PTEs for the kernel portion of the
> address space already initialized). If PTPs are added to the kernel pmap in
> such a way as to require an additional L1 PTE to link them up, then
> already-constructed-but-free L1 PTPs need to be discarded since they will be
> missing part of the kernel's address space.
As pointed out by Jean-Yves, this is the documented behavior of
pool_cache_invalidate(). x86 pmap uses it in a similar way, and checks
that items allocated from the cache are not stale before use.
--
Manuel Bouyer, LIP6, Universite Paris VI.
Manuel.Bouyer%lip6.fr@localhost
NetBSD: 26 ans d'experience feront toujours la difference
--
Home |
Main Index |
Thread Index |
Old Index