From owner-freebsd-net Wed Jun 19 9: 9:20 2002 Delivered-To: freebsd-net@freebsd.org Received: from tesla.distributel.net (nat.MTL.distributel.NET [66.38.181.24]) by hub.freebsd.org (Postfix) with ESMTP id 1856637B404; Wed, 19 Jun 2002 09:09:10 -0700 (PDT) Received: (from bmilekic@localhost) by tesla.distributel.net (8.11.6/8.11.6) id g5JG6fR18603; Wed, 19 Jun 2002 12:06:41 -0400 (EDT) (envelope-from bmilekic@unixdaemons.com) Date: Wed, 19 Jun 2002 12:06:41 -0400 From: Bosko Milekic To: "Kenneth D. Merry" Cc: Dag-Erling Smorgrav , current@FreeBSD.ORG, net@FreeBSD.ORG Subject: Re: new zero copy sockets snapshot Message-ID: <20020619120641.A18434@unixdaemons.com> References: <20020618223635.A98350@panzer.kdm.org> <20020619090046.A2063@panzer.kdm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020619090046.A2063@panzer.kdm.org>; from ken@kdm.org on Wed, Jun 19, 2002 at 09:00:46AM -0600 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wed, Jun 19, 2002 at 09:00:46AM -0600, Kenneth D. Merry wrote: > On Wed, Jun 19, 2002 at 15:55:18 +0200, Dag-Erling Smorgrav wrote: > > "Kenneth D. Merry" writes: > > > With those fixes, plus several fixes that have gone into -current over the > > > past week or so, the zero copy sockets code runs without any WITNESS > > > warnings at all now. > > > > Planning to commit soon? > > That's the plan. I need to see if any comments come up, and then make sure > I'll be in town for a few days at least to handle any problems that come > up. I have a few comments and questions: - In uipc_jumbo.c, you appear to avoid using some of the SLIST macros, notably when grabbing something off the inuse or free lists. - Is the mutex really necessary in jumbo_vm_init()? I suspect that if you need to ensure mutual exclusion here, there's something wrong; (why would you be running the jumbo vm code before having initialized it?) - perhaps you could init the mtx at runtime in the jumbo_vm_init routine. - It's kind of unfortunate that uipc_jumbo.c has to roll its own allocator; There are a couple of alternatives; to just use UMA or mb_alloc for this sort of thing. mb_alloc will wire all pages allocated through it, though, so maybe it would be worth looking at what UMA can do in this respect. If it cannot do exactly what you're looking for, then modifying it to do what you want should be relatively simple. The added advantage is that you'll now be using per-CPU caches for allocations of jumbo bufs, and not the single freelist that you currently use. - I don't know anything about the if_ti code, but it sure looks like it's holding the ti mutex a long time in some places (not only in your patch). > Ken > -- > Kenneth Merry > ken@kdm.org Regards, -- Bosko Milekic bmilekic@unixdaemons.com bmilekic@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message