Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Feb 2002 12:17:30 -0800 (PST)
From:      Julian Elischer <julian@elischer.org>
To:        Bosko Milekic <bmilekic@unixdaemons.com>
Cc:        Terry Lambert <tlambert2@mindspring.com>, Jeff Roberson <jroberson@chesapeake.net>, arch@FreeBSD.ORG
Subject:   Re: Slab allocator
Message-ID:  <Pine.BSF.4.21.0202271210460.97278-100000@InterJet.elischer.org>
In-Reply-To: <20020227150519.A42681@unixdaemons.com>

next in thread | previous in thread | raw e-mail | index | archive | help


On Wed, 27 Feb 2002, Bosko Milekic wrote:

> 
> On Wed, Feb 27, 2002 at 11:41:50AM -0800, Julian Elischer wrote:
> > The idea of Per CPU caches is that only that CPU is accessing it so 
> > therefore you shouldn't need a lock at all. unless you are protecting 
> > against interrupts on your own processor
> > and pre-emption. There are also ways to implement atomic
> > operations on queues that require no locks at all.
> > (e.g. using the test and swap instruction)
> 
>   Yes, that's exactly the point. You have to protect against pre-emption
> and interrupts.
maybe use a critical section instead.. 
or better, a test/swap
or, both...

but it sounds like you need the lock anyhow because
as you said.. it is possible a recently pre-empted thread may continue 
to use the pool of it's old processor for a short moment,
(I'm not sure I like that idea)

> 
> -- 
> Bosko Milekic
> bmilekic@unixdaemons.com
> bmilekic@FreeBSD.org
> 
> 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0202271210460.97278-100000>