Subject: Re: CVS commit: src/regress/sys/kern
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Andrew Doran <ad@netbsd.org>
List: tech-kern
Date: 02/06/2007 14:36:05
On Tue, Feb 06, 2007 at 08:20:10AM +0900, YAMAMOTO Takashi wrote:

> > Committed By:	ad
> > Date:		Mon Feb  5 20:20:48 UTC 2007
> > 
> > Modified Files:
> > 	src/regress/sys/kern/mutex1: test_mutex1.c
> > 	src/regress/sys/kern/mutex2: test_mutex2.c
> > 	src/regress/sys/kern/rwlock1: test_rwlock1.c
> > 
> > Log Message:
> > Drop priority to MAXPRI before starting the tests.
> 
> why?

I changed the scheduler to not alter the actual or effective priority of
kernel threads. One of my intentions was to allow the priority of kthreads
to be fixed, and it matters now that user priorities are scaled to kernel
ones by sched_kpri(). There are a couple of places that kernel threads call
preempt() that I still need to fix.

FWIW, in the near future I would like to do the following:

- change kthread_create() to take a priority argument
- fork kernel threads off proc0 as new LWPs, not new processes
- allow LWPs to take a short name string
- change top & ps to report correctly for processes with multiple LWPs
- give top an 'LWP mode' that will show per-LWP details, including the name

Cheers,
Andrew