Re: Thread implementations...

Dean Gaudet (dgaudet-list-linux-kernel@arctic.org)
Wed, 24 Jun 1998 03:43:30 -0700 (PDT)


On Wed, 24 Jun 1998, David S. Miller wrote:

> Just an idea I had... and it would work. I still think the TLB
> thrashing costs of mmap() compared to write() (the kernel has large
> PTE's so write is unfortunately almost always faster under Linux) is
> going to show up still to some extent, and there isn't much we can do
> about that.

Oh yeah, that bites. What about when you use net cards with on-card
packet assembly? I suppose then it matters whether you can send them v or
p addresses for DMA... the v->p has to be paid somewhere. No wait, you
can pre-pay the v->p as long as the p doesn't change... you pay it once
the first time the file is sent, but then you can re-use the same list of
commands for future attempts.

> The main reason you want mmap() (or sendfile()) over read() is to be able
> to perform single-copy and zero-copy TCP. read() with page-flipping is
> another way to do it, but I really don't know the difficulty.
>
> Be careful what you talk about. write() is not nearly as difficult to
> get zero-copy out of as read(), read() is very difficult without very
> specialized hardware and MTU's > PAGE_SIZE as well.

Hey I'm a webserver guy, I only care about writing to sockets ;)

Dean

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