From owner-freebsd-arch Wed Feb 27 9:50:24 2002 Delivered-To: freebsd-arch@freebsd.org Received: from angelica.unixdaemons.com (angelica.unixdaemons.com [209.148.64.135]) by hub.freebsd.org (Postfix) with ESMTP id DC7C337B41E for ; Wed, 27 Feb 2002 09:50:02 -0800 (PST) Received: from angelica.unixdaemons.com (bmilekic@localhost.unixdaemons.com [127.0.0.1]) by angelica.unixdaemons.com (8.12.2/8.12.1) with ESMTP id g1RHnjh4032828; Wed, 27 Feb 2002 12:49:45 -0500 (EST) Received: (from bmilekic@localhost) by angelica.unixdaemons.com (8.12.2/8.12.1/Submit) id g1RHnjnw032827; Wed, 27 Feb 2002 12:49:45 -0500 (EST) (envelope-from bmilekic) Date: Wed, 27 Feb 2002 12:49:45 -0500 From: Bosko Milekic To: Jeff Roberson Cc: arch@FreeBSD.ORG Subject: Re: Slab allocator Message-ID: <20020227124945.A29065@unixdaemons.com> References: <20020227005915.C17591-100000@mail.chesapeake.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020227005915.C17591-100000@mail.chesapeake.net>; from jroberson@chesapeake.net on Wed, Feb 27, 2002 at 02:03:39AM -0500 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 On Wed, Feb 27, 2002 at 02:03:39AM -0500, Jeff Roberson wrote: [...] > There are two things that I would really like comments on. > > 1) Should I keep the uma_ prefixes on exported functions/types. Yes, I believe that this is generally good practise. > 2) How much of the malloc_type stats should I keep? They either require > atomic ops or a lock in their current state. Also, non power of two > malloc sizes breaks their usage tracking. I suggest that you re-do the stats based on uma, and not based on exactly what malloc exported. Try to group most of the stat modifications (writes) under some existing lock, if that's possible. If not, please don't add another lock just for those stats. I don't think that any statistics should require a lock just to be read (via sysctl()). > 3) Should I rename the files to vm_zone.c vm_zone.h, etc? I think you shouldn't. :-) We shouldn't confuse uma with our old vm_zone. > Since you've read this far, I'll let you know where the patch is. ;-) > > http://www.chesapeake.net/~jroberson/uma.tar > > This includes a patch to the base system that converts several previous > vm_zone users to uma users, and it also provides a vm_zone wrapper for > those that haven't been converted. I did this to minimize the diffs so it > would be easier to review. This also has vm/uma* which you need to > extract into your sys/ directory. > > Any feedback is appreciated. I'd like to know what people expect from > this before it is committable. After looking over it, I think that: (i) This allocator should go into -CURRENT (ii) For what concerns malloc and vm_zone, I suggest that they still live in -CURRENT for the next couple of months (since you've already instrumented them to wrap to uma in your patch). I sugest that a sysctl knob determines whether or not malloc and vm_zone allocation calls wrap to uma or call their old selves. This should allow us to quickly switch back and forth for the next couple of months, and it will probably also minimize conflicts for those maintaining large patch sets (*ducks* :-)). (iii) For what concerns mbuf allocations, I don't know what to tell you right now. Ultimately, I would like to see uma eventually replace mb_alloc. However, I would like to make sure that the transition is smooth and painless and that we don't lose any performance. This is why I think that co-existing uma with all existing code (see (ii)) is a good idea. Then, if you're willing, I would be glad to help "attach" mbuf allocations to uma, should that be possible and should we decide, as a group, that that is what we want to do. > Jeff > > PS Sorry for the long winded email. :-) Regards, -- 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