From owner-freebsd-net@FreeBSD.ORG Wed Dec 19 19:44:01 2007 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 974E716A418 for ; Wed, 19 Dec 2007 19:44:01 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outC.internet-mail-service.net (outC.internet-mail-service.net [216.240.47.226]) by mx1.freebsd.org (Postfix) with ESMTP id 7ECA613C448 for ; Wed, 19 Dec 2007 19:44:01 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Wed, 19 Dec 2007 11:44:00 -0800 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 26311126CF7; Wed, 19 Dec 2007 11:44:00 -0800 (PST) Message-ID: <47697480.9070208@elischer.org> Date: Wed, 19 Dec 2007 11:44:00 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: David G Lawrence References: <20071218170133.X32807@delplex.bde.org> <47676E96.4030708@samsco.org> <20071218233644.U756@besplex.bde.org> <20071218141742.GS25053@tnn.dglawrence.com> <20071219022102.I34422@delplex.bde.org> <20071218165732.GV25053@tnn.dglawrence.com> <20071218181023.GW25053@tnn.dglawrence.com> <20071219235444.K928@besplex.bde.org> <20071219151926.GA25053@tnn.dglawrence.com> <20071220032223.V38101@delplex.bde.org> <20071219170434.GG25053@tnn.dglawrence.com> In-Reply-To: <20071219170434.GG25053@tnn.dglawrence.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org, freebsd-stable@freebsd.org Subject: Re: Packet loss every 30.999 seconds X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Dec 2007 19:44:01 -0000 David G Lawrence wrote: >>> In any case, it appears that my patch is a no-op, at least for the >>> problem I was trying to solve. This has me confused, however, because at >>> one point the problem was mitigated with it. The patch has gone through >>> several iterations, however, and it could be that it was made to the top >>> of the loop, before any of the checks, in a previous version. Hmmm. >> The patch should work fine. IIRC, it yields voluntarily so that other >> things can run. I committed a similar hack for uiomove(). It was > > It patches the bottom of the loop, which is only reached if the vnode > is dirty. So it will only help if there are thousands of dirty vnodes. > While that condition can certainly happen, it isn't the case that I'm > particularly interested in. > >> CPUs, everything except interrupts has to wait for these syscalls. Now >> the main problem is to figure out why PREEMPTION doesn't work. I'm >> not working on this directly since I'm running ~5.2 where nearly-full >> kernel preemption doesn't work due to Giant locking. > > I don't understand how PREEMPTION is supposed to work (I mean > to any significant detail), so I can't really comment on that. It's really very simple. When you do a "wakeup" (or anything else that puts a thread on a run queue) i.e. use setrunqueue() then if that thread has more priority than you do, (and in the general case is an interrupt thread), you immedialty call mi_switch so that it runs imediatly. You get guaranteed to run again when it finishes. (you are not just put back on the run queue at the end). the critical_enter()/critical_exit() calls disable this from happening to you if you really must not be interrupted by another thread. there is an option where it is not jsut interrupt threads that can jump in, but I think it's usually disabled. > > -DG > > David G. Lawrence > President > Download Technologies, Inc. - http://www.downloadtech.com - (866) 399 8500 > The FreeBSD Project - http://www.freebsd.org > Pave the road of life with opportunities. > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"