From owner-freebsd-net Sat Sep 23 23:19:10 2000 Delivered-To: freebsd-net@freebsd.org Received: from field.videotron.net (field.videotron.net [205.151.222.108]) by hub.freebsd.org (Postfix) with ESMTP id 5584337B422; Sat, 23 Sep 2000 23:19:02 -0700 (PDT) Received: from modemcable136.203-201-24.mtl.mc.videotron.ca ([24.201.203.136]) by field.videotron.net (Sun Internet Mail Server sims.3.5.1999.12.14.10.29.p8) with ESMTP id <0G1D0042JO7OXQ@field.videotron.net>; Sun, 24 Sep 2000 02:19:00 -0400 (EDT) Date: Sun, 24 Sep 2000 02:22:41 -0400 (EDT) From: Bosko Milekic Subject: Re: mbuf system and SMPng (new revised diff) In-reply-to: To: Chuck Paterson Cc: freebsd-net@FreeBSD.ORG, freebsd-arch@FreeBSD.ORG Message-id: MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Following Chuck Paterson's suggestions, I've reviewed the mbuf diff once again and diff'ed up a new revised version: http://people.freebsd.org/~bmilekic/mbuf_mtx-v6.diff I've really "axed" up sys/sys/mbuf.h, and have seperated the macros into more logical divisions, and ones that minimize code bloat (in fact, the diff is a TAD smaller, ~1.5k smaller). In effect, I've gotten rid of m_mballoc_wait_hdr and now just use m_mballoc_wait; much cleaner. Following Chuck's advice, I've minimized the hysterics over grabbing locks before and after the allocator routines. The only thing to note is that despite a mutex being held, certain mbstat members still need to be manipulated with atomic()s as they may sometimes be modified from code holding the mmbfree lock, and sometimes from code holding the mclfree lock (there are only 2 such members, if I recall). If you're reviewing, be sure to carefully look at the changes in sys/sys/mbuf.h. I've also tested this diff under heavy network load and a local mbuf starvation simulation, and it seemed to hold up pretty well (on UP hardware). Same deal for this version of the diff as before, comments/reports requested! Cheers, Bosko Milekic bmilekic@technokratis.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message