From owner-freebsd-arch Wed Feb 27 12:47:20 2002 Delivered-To: freebsd-arch@freebsd.org Received: from gull.prod.itd.earthlink.net (gull.mail.pas.earthlink.net [207.217.120.84]) by hub.freebsd.org (Postfix) with ESMTP id 1CC8337B420 for ; Wed, 27 Feb 2002 12:45:59 -0800 (PST) Received: from pool0139.cvx21-bradley.dialup.earthlink.net ([209.179.192.139] helo=mindspring.com) by gull.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 16gAxX-0002uj-00; Wed, 27 Feb 2002 12:45:55 -0800 Message-ID: <3C7D454D.3B9C3A69@mindspring.com> Date: Wed, 27 Feb 2002 12:45:01 -0800 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Alfred Perlstein Cc: Julian Elischer , Matthew Dillon , Jeff Roberson , arch@FreeBSD.ORG Subject: Re: Slab allocator References: <200202271926.g1RJQCm29905@apollo.backplane.com> <20020227194256.GR80761@elvis.mu.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Alfred Perlstein wrote: > * Julian Elischer [020227 11:40] wrote: > > On Wed, 27 Feb 2002, Matthew Dillon wrote: > > > Well, one thing I've noticed right off the bat is that the code > > > is trying to take advantage of per-cpu queues but is still > > > having to obtain a per-cpu mutex to lock the per-cpu queue. > > > > I was wondering abuot that myself :-) > > It's basically the pre-emption stuff you guys are wondering about > along with the possiblity of free'ing back to another cpu's > cache that may be an issue. > > Jeff, are you fee'ing memory back to the cache it was initially > allocated from or not? See my other posting. The way to deal with this is to have a per CPU "work to do" queue, which is only locked when it is written to by another CPU, and only locked by the local CPU when it is non-empty, in order to empty it, where the empty-check can be done without locking. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message