l4-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: thread ids, task ids and subsystems


From: Marcus Brinkmann
Subject: Re: thread ids, task ids and subsystems
Date: Wed, 2 Apr 2003 20:51:21 +0200
User-agent: Mutt/1.5.3i

On Wed, Apr 02, 2003 at 08:27:35PM +0200, Volkmar Uhlig wrote:
> You still have to delete and re-create tasks to implement fork/execve
> for example. And there performance matters in particular if your one and
> only privileged thread may need 100us or more to perform the thread
> creation/deletion and is blocked for that time... 

Yeah, right.  Thanks for all the input.

> Additionally, you have significant cache-line migration costs to get the
> request onto the other CPU. When deleting and re-creating the task, it
> will show up on the wrong CPU and the load balancer has to migrate it
> afterwards adding another X-CPU scheduling request (per thread!). So
> better do it on the right CPU in the first place.

Ouch :)  That makes sense.

> > Anyway, by not allowing a subsystem to have M privileged 
> > threads we are enforcing a policy decision to them, so I think that 
> > making M privileged threads possible is certainly a good idea.
> 
> That should solve it. You could also have a magic version number
> identifying privileged threads, i.e. -1? (I guess you don't wanna give
> up 1 for init ;)

Another good idea, although I wonder if that gains us anything.
I assume that you never want more privileged threads than the number of
processors, and if you want less, that the thread numbers that are wasted
don't matter as the number of processors is usually small.

I also think I will round it up to a power of two, to keep things down
to simple bit tests.

Oh, and I couldn't care less about the PID of init, really :)

Thanks,
Marcus

-- 
`Rhubarb is no Egyptian god.' GNU      http://www.gnu.org    address@hidden
Marcus Brinkmann              The Hurd http://www.gnu.org/software/hurd/
address@hidden
http://www.marcus-brinkmann.de/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]