tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Passive serialization support in the pool allocator



On Tue, 21 Dec 2021 18:19:56 -0800
Jason Thorpe <thorpej%me.com@localhost> wrote:

> An #ifdef that Taylor added in the new DRM code was bugging me,
> because a similar situation already existed in the NetBSD kernel,
> whereby the type stability of a object’s backing memory (the iam
> existentium case being LWPs) was required for a passively-serialized
> weak reference to work.  The LWP pool cache had a hack to handle it,
> and the hack was propagated to the new DRM code under an “#ifdef
> __NetBSD__”.
> 
> I initially fixed this by adding a “pre-destruct” callback that could
> be optionally set for a pool cache, but after further discussion, it
> seemed like having direct knowledge of passive serialization
> synchronization points in the allocator was a better solution, so
> here is a diff that implements it for you review.
> 
> 	https://www.netbsd.org/~thorpej/pool-pser-diff.txt
> 
> Please comment ASAP, because I want to ride a kernel version bump.
> 
> -- thorpej
> 

LGTM.

Giving the pool knowledge about passive serialization makes it (in my
understanding at least) more easy understandable and keeps the
pool/pool_cache api cleaner.

para


-- 
You will continue to suffer
if you have an emotional reaction to everything that is said to you.
True power is sitting back and observing everything with logic.
If words control you that means everyone else can control you.
Breathe and allow things to pass.

--- Bruce Lee


Home | Main Index | Thread Index | Old Index