[Top][All Lists]

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

RE: thread ids, task ids and subsystems

From: Volkmar Uhlig
Subject: RE: thread ids, task ids and subsystems
Date: Wed, 2 Apr 2003 20:27:35 +0200

> -----Original Message-----
> From: Marcus Brinkmann [mailto:address@hidden 
> Sent: Wednesday, April 02, 2003 8:02 PM
> > having a single privileged thread will result in poor SMP 
> > performance, since you have to IPC cross processor. That will 
> > add significant latency to thread creation/deletion. You should 
> > therefore have one privileged HURD thread per physical processor.
> Thanks for the tip.  I guess that is easy to add by just 
> allowing the first M threads in each subsystem to be privileged, 
> and the normal thread numbers start at M in each subsystem, where 
> M is the number of processors.
> However, I wonder if we are not safed by keeping a pool of 
> threads in each task.  If each task pre-allocates threads, maybe 
> even with exponential backoff, is it really that much of a problem?

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... 

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.

> 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 ;)

- Volkmar

reply via email to

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