From owner-freebsd-threads@FreeBSD.ORG Tue Apr 27 07:47:25 2004 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A832516A4CF; Tue, 27 Apr 2004 07:47:25 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3982943D41; Tue, 27 Apr 2004 07:47:25 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.10/8.12.1) with ESMTP id i3RElLQk025312; Tue, 27 Apr 2004 10:47:21 -0400 (EDT) Date: Tue, 27 Apr 2004 10:47:21 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: John Baldwin In-Reply-To: <200404270947.08523.jhb@FreeBSD.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: threads@FreeBSD.org cc: David Xu Subject: Re: kse_release and kse_wakeup problem (fwd) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Apr 2004 14:47:25 -0000 On Tue, 27 Apr 2004, John Baldwin wrote: > On Monday 26 April 2004 01:38 pm, Daniel Eischen wrote: > > On Mon, 26 Apr 2004, Daniel Eischen wrote: > > > > > > I'm experimenting with adding an wakeup_thread() to kern_thread.c > > > (to complement wakeup() and wakeup_one()). If we shouldn't be > > > using sleepq's directly, the thread code either needs to > > > > > > a) queue msleep()'ing upcalls/threads itself having them > > > all block on on their own unique wchan's; or > > > > > > b) use a wakeup_thread() that wakes up a specific thread. > > > > Sorry, patch for b) is at: > > > > http://people.freebsd.org/~deischen/sys.diffs > > Erm, does sleepq_signal_thread() do anything different than sleepq_remove() > (removes a thread from a specified wait channel if and only if the thread is > sleeping on that wait channel)? I guess not. I thought we would have to search the list of threads to ensure it was queued. I've updated the patch slightly -- added thread_upcall_check() and changed where the new thread flags are stored: http://people.freebsd.org/~deischen/sys.diffs If I remove sleepq_signal_thread() and use sleepq_remove() instead, does the patch look OK to you? Thanks, -- Dan Eischen