From owner-freebsd-current@FreeBSD.ORG Thu Apr 17 20:41:28 2003 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 39BDF37B401 for ; Thu, 17 Apr 2003 20:41:28 -0700 (PDT) Received: from mail.chesapeake.net (chesapeake.net [205.130.220.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6561F43FBF for ; Thu, 17 Apr 2003 20:41:27 -0700 (PDT) (envelope-from jroberson@chesapeake.net) Received: from localhost (jroberson@localhost) by mail.chesapeake.net (8.11.6/8.11.6) with ESMTP id h3I3fNu84816; Thu, 17 Apr 2003 23:41:23 -0400 (EDT) (envelope-from jroberson@chesapeake.net) Date: Thu, 17 Apr 2003 23:41:23 -0400 (EDT) From: Jeff Roberson To: Julian Elischer In-Reply-To: Message-ID: <20030417234012.Y76635-100000@mail.chesapeake.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: FreeBSD current users Subject: Re: some small patches 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: Fri, 18 Apr 2003 03:41:28 -0000 On Thu, 17 Apr 2003, Julian Elischer wrote: > > > On Thu, 17 Apr 2003, Jeff Roberson wrote: > > > I object to the sched_clock() change. We've discussed this on threads@ > > Yes and the clock code doesn't need to know about KSEs and it is of > ABSOLUTLY NO difference to the sched_clock() function if it derives the > thread from the KSE or derives the KSE from the thread. > > there is no big difference between > sched_clock(curthread); > and > sched_clock(curthread->td_kse) > except that one requires kern_clock.c to know about KSEs and one > doesn't. The difference is in the meaning of the function and not the functionality. It is an interface that operates on a property of the kse and not the thread. > > > > > On Thu, 17 Apr 2003, Julian Elischer wrote: > > > > > > > > > > > On Thu, 17 Apr 2003, Andrew R. Reiter wrote: > > > > > > > On Thu, 17 Apr 2003, Julian Elischer wrote: > > > > > > > > : > > > > :Here are two small patches they are pretty non-controversial in my > > > > :opinion. > > > > : > > > > :they are part of a bigger patch, but I'd like to get them in separatly > > > > :to simplify the bigger one. > > > > :the first patch: > > > > :http://www.freebsd.org/~julian/IDLETD.diff > > > > :moves the flag that identifies a thread as being one of the idle threads > > > > :from the KSE to the thread. The code that wants to know already > > > > :has a thread pointer, but not the KSE pointer so this makes more sense. > > > > > > > > Is this correct? > > > > > > > > Index: sys/proc.h > > > > =================================================================== > > > > RCS file: /repos/projects/mirrored/freebsd/src/sys/sys/proc.h,v > > > > retrieving revision 1.313 > > > > diff -u -r1.313 proc.h > > > > --- sys/proc.h 2003/04/13 21:29:11 1.313 > > > > +++ sys/proc.h 2003/04/17 22:52:07 > > > > @@ -349,6 +323,7 @@ > > > > #define TDF_CAN_UNBIND 0x000004 /* Only temporarily bound. */ > > > > #define TDF_SINTR 0x000008 /* Sleep is interruptible. */ > > > > #define TDF_TIMEOUT 0x000010 /* Timing out during sleep. */ > > > > +#define TDF_IDLETD 0x000040 /* This is an idle thread */ > > > > #define TDF_SELECT 0x000040 /* Selecting; wakeup/waiting > > > > danger. */ > > > > #define TDF_CVWAITQ 0x000080 /* Thread is on a cv_waitq (not > > > > slpq). */ > > > > #define TDF_UPCALLING 0x000100 /* This thread is doing an > > > > upcall. */ > > > > > > > > > > > > Both TDF_IDLETD and TD_SELECT have the same value. > > > > > > > > > uh, no, TDF_IDLETD should be 0x20 > > > I copied that line by hand from my test system because > > > the diff from there is different (there are more changes frm which this > > > was extracted) and flubbed it.. good catch. > > > (That's why we do reviews right?) :-) > > > > > > > > > > > > > > Just curious. > > > > > > > > Cheers, > > > > Andrew > > > > > > > > > > > > : > > > > : > > > > :The second patch: > > > > :http://www.freebsd.org/~julian/sched_clock.diff > > > > :makes the sched_ API entrypoint sched_clock() > > > > :take a thread argument instead of a KSE. > > > > :Once again, the callers have the thread pointer and not the KSE pointer, > > > > :and in fact they probably should not have the KSE pointer. > > > > : > > > > : > > > > :anyone object to these patches? > > > > : > > > > : > > > > :_______________________________________________ > > > > :freebsd-current@freebsd.org mailing list > > > > :http://lists.freebsd.org/mailman/listinfo/freebsd-current > > > > :To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > > > > : > > > > > > > > -- > > > > Andrew R. Reiter > > > > arr@watson.org > > > > arr@FreeBSD.org > > > > > > > > > > > _______________________________________________ > > freebsd-current@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-current > > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > > >