From owner-freebsd-net Sun Sep 17 14:21:58 2000 Delivered-To: freebsd-net@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 816EF37B422 for ; Sun, 17 Sep 2000 14:21:55 -0700 (PDT) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id RAA60479; Sun, 17 Sep 2000 17:21:53 -0400 (EDT) (envelope-from wollman) Date: Sun, 17 Sep 2000 17:21:53 -0400 (EDT) From: Garrett Wollman Message-Id: <200009172121.RAA60479@khavrinen.lcs.mit.edu> To: Alfred Perlstein Cc: net@FreeBSD.ORG Subject: Re: Your comment re so_gencnt In-Reply-To: <20000917140241.O15156@fw.wintelcom.net> References: <20000908142322.I12231@fw.wintelcom.net> <200009082234.SAA56346@khavrinen.lcs.mit.edu> <20000908155712.L12231@fw.wintelcom.net> <200009082354.TAA56853@khavrinen.lcs.mit.edu> <20000917140241.O15156@fw.wintelcom.net> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org < said: > Is it possible for you to come up with an alternate scheme for > doing this or seeing about making zalloci MPsafe? I'd really rather > not have to grab Giant for each socket allocated/freed. Fixing zalloci would be really out of my department, and it will probably be a few months before I'm up to speed on the New World Order. However, I think the right thing in general for the zone allocator is to have the call to zinit() specify a lock, possibly specific to each zone, which the allocator will grab when necessary. The fact that zalloci() currently blocks out all interrupts is a remnant of the fact that there was no general mutual-exclusion mechanism in the Old World Order. > One suggestion would just to go back to using the system malloc > and keeping a freelist which should achive the same effect as stable > storage This would work as well. The important property is that the allocations be type-stable once a reference has been created; before any references exist it's irrelevant. Also, if the zone allocator learns to do locking, then it can also learn to do the appropriate tricks to make ``interrupt'' zones behave the same way as ``top-half'' zones currently do wrt expansion. -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message