Linux-kernel mailing list archive 1998-10,: Re: mmap() versus read()

# Re: mmap() versus read()

David Wragg (dpw@doc.ic.ac.uk)
Tue, 10 Mar 1998 23:41:00 GMT

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Scott Lampert: "Re: 2.1.89 broken?"
- Previous message: Jason Saggers: "ParPort problem ?"
- Next in thread: Perry Harrington: "Re: mmap() versus read()"
- Reply: Perry Harrington: "Re: mmap() versus read()"

MOLNAR Ingo <mingo@chiara.csoma.elte.hu> 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(). [...]
>
> oops, it's more than 20 usecs, i accidentally have measured it on an SMP
> system. On uniprocessors it's ~40 usecs on a 200 MHz PPro (should be
> ~11000 cycles on your box i think).

Hang on.

Running Ingo's program on my 233MHz (overclocked) PPro (UP), with an
egcs-1.01 built 2.1.89 kernel, I get around 2050. That's 8 usecs; at
200MHz it would probably be 9 or 10 usecs.

I have my own program which makes a similar test, and it gets a
similar result. It also mesures various aspects of LinuxThreads,
including pthread_create() for which I get just under 35000
cycles. Could Perry inadvertently be quoting a pthread_create() time?

    --
    Dave Wragg

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu

- Next message: Scott Lampert: "Re: 2.1.89 broken?"
- Previous message: Jason Saggers: "ParPort problem ?"
- Next in thread: Perry Harrington: "Re: mmap() versus read()"
- Reply: Perry Harrington: "Re: mmap() versus read()"