Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Oct 2001 17:28:00 -0700 (PDT)
From:      Julian Elischer <julian@elischer.org>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org
Subject:   RE: cvs commit: src/sys/alpha/alpha interrupt.c
Message-ID:  <Pine.BSF.4.21.0110011716010.87441-100000@InterJet.elischer.org>
In-Reply-To: <XFMail.011001152915.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Because it's a KSE specific action?

This is not written in stone. In going through the functions I 
tried to select the structure that best reflected the 
expected behaviour needed.

In this case, you are collecting statistics about who is running and who
is sleeping (etc.) The entity that is run is the KSE. It in turn processes
work from runnable threads, but it is still the KSE that is charged with
the time. There might also some very small moments of time when there may
not BE a thread correctly chargable (though this is not certain). I
decided to play it safe.. 

The threads are temporary and may be vapourised at a moment's notice if
the syscall can return to the user boundary, while the KSE is persistant
through the life of the program and can gather statistics. Adding stats to
the thread would require reaping them from the thread at every syscall
completion and adding them into the KSE's stats so as to no lose them when
the thread retunrs to user space. (and the thread structure is re-used
somewhere else.)

The test in statclock_process() (td != curthread) is nothing more than a 
sanity check for a condition that I'm was not able to 100% 
guarantee from code examination.


You are welcome to suggest and even implement changes as to how this is
done though of course I would like the change to discus them first.

If we take a thread as the argument, then the forst line would need to be:
 ke = td->td_kse;

it's not a tremendous difference.
If you have a large objection, feel free to change it.. it won't affect 
the general design..




On Mon, 1 Oct 2001, John Baldwin wrote:

> 
> On 01-Oct-01 John Baldwin wrote:
> > jhb         2001/10/01 15:26:48 PDT
> > 
> >   Modified files:
> >     sys/alpha/alpha      interrupt.c 
> >   Log:
> >   Sigh, statclock_process() takes a KSE instead of a thread for its first
> >   argument.
> 
> Grrr, why does statclock_process() take a KSE, and hardclock_process() take a
> thread?  Is consistency too much to ask?  Also, the panic message in the
> KASSERT() in statclock_process() (td != curthread) implies that
> statclock_proceess() takes a thread.  The panic message should be 'ke !=
> curkse' instead if it stays using kse's.  Personally, I think *clock_process()
> should both take threads and should be renamed *clock_thread().
> 
> -- 
> 
> John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
> PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
> "Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/
> 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0110011716010.87441-100000>