From owner-freebsd-current@FreeBSD.ORG Mon Oct 11 14:21:41 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2743E16A4CE; Mon, 11 Oct 2004 14:21:41 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 13ED843D3F; Mon, 11 Oct 2004 14:21:41 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from [127.0.0.1] (davidxu@localhost [127.0.0.1]) i9BELcqD007405; Mon, 11 Oct 2004 14:21:40 GMT (envelope-from davidxu@freebsd.org) Message-ID: <416A97F5.6010608@freebsd.org> Date: Mon, 11 Oct 2004 22:25:57 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.7.2) Gecko/20041004 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Sam Lawrance References: <1097500052.2797.10.camel@dirk.no.domain> In-Reply-To: <1097500052.2797.10.camel@dirk.no.domain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-current@freebsd.org cc: Robert Watson Subject: Re: Noticable Delays Since Beta 3 (possible cause) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Oct 2004 14:21:41 -0000 Sam Lawrance wrote: >Folks, > >On Mon, 2004-10-11 at 04:55 -0400, Robert Watson wrote: > > >>On Sat, 9 Oct 2004, Sam Lawrance wrote: >> >> >> >>>I'm sorry, that patch was missing paths.. this one: >>> >>>http://sam.stral.net/freebsd/wakeupdelay-patch >>> >>>is much nicer. >>> >>> >>Are there plans to get this patch merged for 5.3? I was chatting with >>Brian yesterday about the accept locking issue in sofree() and he was >>indicating that he was seeing symptoms very much like the ones described >>in this thread (long wakeup times for keypresses, etc). >> >> > >I just noticed that the messages David sent to me and the list have yet >to make it through to the list. One was a patch which puts the wakeup in >the critical_exit where he suggested (but I didn't understand :). Here >it is: > > > Yes, I made the patch, the theory is holding spinlock increases critical count, releasing a spinlock decreases it, when critical count is about to be decreased to zero, I know curthread has no spinlock in hand, so it is not possible to have sleepq lock and sched lock LOR problem if I do a wakupe(&proc0) at the time. I believe that it is a very short time that a thread is in critical region, consider the time we have to swap in a thread by doing disk I/O which is slow, such delay of wakeup proc0 in spinlock can be ignored. I am going to sleep, and must leave now, if anyone has time to commit it, free to do. David Xu