Re: Alan Cox quote? (was: Re: accounting for threads)

Larry McVoy
2001-06-19T17:41:56Z

On Tue, Jun 19, 2001 at 10:36:00AM -0700, Jonathan Lundell wrote:
> At 9:09 AM -0700 2001-06-19, Larry McVoy wrote:
> >Don't you think it is funny that Sun doesn't publish numbers comparing
> >their thread performance to process performance? Sure, you can find
> >context switch benchmarks where they have user level switching going on
> >but those are a red herring. The real numbers you want are the kernel
> >level context switches and those are just as expensive as the process
> >context switch numbers.
>
> Sun (or at least SPARC) is a bit of a special case, though. SPARC's
> register-window architecture makes thread-switching (not to mention
> recursion) significantly more expensive than on most other
> architectures.

Yes, but that misses the point. The point is that you have to do the same
work, almost, to switch a kernel thread as a process. You don't have to
switch the VM context but that isn't the dominating term. So the fact that
Sun has slow[er] context switching and slow[er] thread switching isn't the
issue. The issue is that people perceive threads to be cheap but they are
not cheap at all. It's the relative cheapness, or lack thereof, when
comparing them to processes.
--
---
Larry McVoy lm at bitmover.com http://www.bitmover.com/lm