[lkml]   [1998]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: mmap() versus read()
Perry Harrington writes:
> >
> >
> > On Mon, 9 Mar 1998, Perry Harrington wrote:
> >
> > > I think everyone will
> > > agree that the current clone() method of creating threads is costly
> > > at best. [...]
> >
> > uhm, ~20 usecs on a 200 MHz PPro, is that 'costly at best'?
> I still count in clock ticks. 35000 something IIRC last time I knew
> for a fork()/clone(). Context switches are somewhat costly from what I've
> heard too. FWIW, I have a P233MMX now, upgraded from a 486-120, the
> cxtx switch on an x86 is much faster than other machines (from what I've
> seen), probably from the TSS and builtin intel hacks. What and where are
> you getting ~20usec? Anything will be fast on a 200mhz PPro, doesn't mean
> that your 486-66 is going to rip Win95 a new ***hole.

Mingo said it takes ~20 us on a PPro 200. So that's 4000 clock ticks,
an order of magnitude less than the 35000 you are quoting. Also,
clone() is *much* faster than fork(). Although someone (Mingo?) said
he had some ideas to make fork() several times faster...

Is that 35000 clock ticks for Linux 2.0.x or 2.1.x?

And I don't believe that Linux context switches are more costly than
Solaris. From my experience Solaris is quite slow at context

> Pardon me if I seem a little confrontational, I'm not the only one who
> sees clone() as costly. Also, compare these to Solaris thread creation
> and such, you'll find that solaris can do some pretty good stuff on a
> lowly machine. (Perish the thought!)

I simply don't believe that Solaris is faster at LWP creation than
Linux clone(). I'd want to see real numbers before I believe it.

It may well be that Solaris userland thread creation is faster than
Linux clone(), but that's irrelevant to the kernel list. The
appropriate forum for that discussion is linux-threads, which deals
with the userland thread library.



To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to

 \ /
  Last update: 2005-03-22 13:41    [W:0.057 / U:11.460 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site