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

next in thread | previous in thread | raw e-mail | index | archive | help
* Julian Elischer <julian@elischer.org> [020227 12:20] wrote:
> 
> 
> 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)

Leave it alone.  The locks are a perfectly fine
abstraction for the time being to get what we want
and need.  I'm for the per-cpu locks, and we can remove/fix
them later if it's an issue.  Removing locks is easier than
adding them imo.

-- 
-Alfred Perlstein [alfred@freebsd.org]
'Instead of asking why a piece of software is using "1970s technology,"
 start asking why software is ignoring 30 years of accumulated wisdom.'
Tax deductible donations for FreeBSD: http://www.freebsdfoundation.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?20020227202332.GU80761>