From owner-freebsd-arch Sat Jan 25 20: 2:31 2003 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 423E037B401; Sat, 25 Jan 2003 20:02:30 -0800 (PST) Received: from mail.chesapeake.net (chesapeake.net [205.130.220.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D7E543F5F; Sat, 25 Jan 2003 20:02:29 -0800 (PST) (envelope-from jroberson@chesapeake.net) Received: from localhost (jroberson@localhost) by mail.chesapeake.net (8.11.6/8.11.6) with ESMTP id h0Q42O409706; Sat, 25 Jan 2003 23:02:24 -0500 (EST) (envelope-from jroberson@chesapeake.net) Date: Sat, 25 Jan 2003 23:02:24 -0500 (EST) From: Jeff Roberson To: Julian Elischer Cc: Matthew Dillon , Steve Kargl , Robert Watson , Gary Jennejohn , Subject: Re: New scheduler (#3) In-Reply-To: Message-ID: <20030125230123.W7994-100000@mail.chesapeake.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > I want the sleep time to ONLY reflect voluntary sleep time. Thats why it > > was only done in sched_sleep(). It looks like I might have to add it to > > either select or the condvar code. I think that perhaps adding it to > > condvar would be correct since that is a voluntary sleep. > > > > Good catch. thanks. > > Select uses cv_wait() > > Both jhb and I have been considering passing a parameter to mi_switch() > that indicates if the switch was voluntary or not.. > in the meanwhile you can do: > if (TD_IS_ON_SLEEPQ(td)) > in mi_switch (sched_switchout()) > to catch both cases.. or just call sched_sleep() from the cv code > as it's almost identical to the sleep code.. I added sched_sleep() to the cv code since it was doing the old way manually. Now it is correct for both schedulers. I do like the idea of vol/invol parameter to mi_switch(). Cheers, Jeff To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message