>the first couple of KB. Given the loader does so little, it hardly seems
>worth bothering to run it. You need to nkow the h/w to drive it, and a
>paging or reset register isn't exactly difficult.

Yeah, that's my feeling too. 

>Why bother with loaders, at the expense of thread switch times? On
>NetBSD, I shortcut switching between different kernel threads (eg
>process reaper) although that patch hasn't been committed yet which I
>think is kind-of what Phil suggested.

Basically.  Since a kernel thread (usually) doesn't have any memory mapping in 
the area normally touched by user tasks, we don't have to worry about cache 
issues.  In fact I've now thought of a way to play things that will hopefully 
allow us to handle the case where a user process is fighting a kernel thread 
for the CPU without any cache flush at all, and the clone() case comes out in 
the wash which is an extra bonus. :-)

Essentially what you do is just to remember the last set of pagetables you 
loaded for a non-kernel thread (having nobbled kecardd such that it doesn't 
count as a kernel thread any more).  If it's the same as the one you're about 
to load in, or if the new task is a kernel thread, you can skip the cache and 
TLB drama.

I'll see if I can come up with a patch later.  By the way, before I send the 
CATS board back, do you guys have any benchmark numbers for NetBSD running on 
one of those?  I'd be interested to see how Linux compares.

p.


unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]

Reply via email to