From owner-freebsd-arch Tue Apr 9 18:53:20 2002 Delivered-To: freebsd-arch@freebsd.org Received: from softweyr.com (softweyr.com [65.88.244.127]) by hub.freebsd.org (Postfix) with ESMTP id 86DFB37B416 for ; Tue, 9 Apr 2002 18:53:10 -0700 (PDT) Received: from nextgig-5.customer.nethere.net ([209.132.102.165] helo=softweyr.com) by softweyr.com with esmtp (Exim 3.35 #1) id 16v7I3-000EqU-00; Tue, 09 Apr 2002 19:52:51 -0600 Message-ID: <3CB37FAF.DE67363E@softweyr.com> Date: Tue, 09 Apr 2002 17:56:31 -0600 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.78 [en] (X11; U; Linux 2.4.2 i386) X-Accept-Language: en MIME-Version: 1.0 To: Dag-Erling Smorgrav Cc: Jeff Roberson , arch@freebsd.org Subject: Re: Removing limits from malloc(9) References: <20020408041726.U53877-100000@mail.chesapeake.net> 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 Dag-Erling Smorgrav wrote: > > Jeff Roberson writes: > > The last bit that is missing before we can call malloc/free w/o Giant is > > the malloc_type statistics. Currently there is nothing really protecting > > them. There really is no lock that they can conveniently live under. I > > have a few options. The one that I'm leaning towards is only enabling > > malloc_type statistics if INVARIANTS is compiled in. Then I could make > > one lock per malloc_type. The reason this shouldn't be the default is > > because it creates a single point of contention which is in sharp contrast > > with the rest of the allocator. > > It's still a lot better than Giant, and it's a leaf lock so there > shouldn't be any worries about reversal. I'd go for it if I were you. Can they be updated with an atomic increment? For statistics like this, being off by 1 or 2 on read isn't so important as long as you don't miss a bunch of counts. -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message