From owner-freebsd-net@FreeBSD.ORG Fri Mar 11 14:31:18 2005 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B4F116A4DF; Fri, 11 Mar 2005 14:31:18 +0000 (GMT) Received: from f7.mail.ru (f7.mail.ru [194.67.57.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id C2F1C43D58; Fri, 11 Mar 2005 14:31:17 +0000 (GMT) (envelope-from _pppp@mail.ru) Received: from mail by f7.mail.ru with local id 1D9lAa-000FJD-00; Fri, 11 Mar 2005 17:31:16 +0300 Received: from [81.200.13.122] by win.mail.ru with HTTP; Fri, 11 Mar 2005 17:31:16 +0300 From: dima <_pppp@mail.ru> To: Pawel Jakub Dawidek Mime-Version: 1.0 X-Mailer: mPOP Web-Mail 2.19 X-Originating-IP: [81.200.13.122] Date: Fri, 11 Mar 2005 17:31:16 +0300 In-Reply-To: <20050311141450.GF9291@darkness.comp.waw.pl> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit Message-Id: cc: John Baldwin cc: Luigi Rizzo cc: Gleb Smirnoff cc: ru@FreeBSD.org cc: net@FreeBSD.org cc: rwatson@FreeBSD.org Subject: Re[2]: Giant-free polling [PATCH] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: dima <_pppp@mail.ru> List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Mar 2005 14:31:18 -0000 > On Fri, Mar 11, 2005 at 04:55:25PM +0300, dima wrote: > +> I thought about using list also, but considered it to bring > +> too much overhead to the code. The original idea of handling arrays > +> seems to be very elegant. > > Overhead? Did you run any benchmarks to prove it? > I find list-version much more elegant that using an array. It was an assumption in fact. So, I didn't try to implement a list-based version. We should merge our efforts anyway and both versions should naturally be tested and benchmarked. > > I also don't like the idea of calling handler method with two locks > held (one sx and one mutex)... This gives the highest possible granularity though... > > There is still an unresolved problem (in your and our patch as well) of > using ifnet structure fields without synchronization, as we don't have > access tointerface's internal mutex, which protects those fields. I guess iface_locks[] should be removed then. We actually can get the interface's internal mutex as ifp->ifq_mtx; I will think about that on weekend. > > -- > Pawel Jakub Dawidek http://www.wheel.pl > pjd@FreeBSD.org http://www.FreeBSD.org > FreeBSD committer Am I Evil? Yes, I Am! > > ATTACHMENT: application/pgp-signature >