Re: Thread implementations...

Martin Mares (mj@atrey.karlin.mff.cuni.cz)
Sun, 28 Jun 1998 12:06:59 +0200


Hi,

> In short, in "sendfile()" I have something that I'm confident works, and
> will always continue to do so, and I feel that the kernel will always be
> able to do a good implementation of it. I don't have the same confidence
> in the more generic "copyfd()" - I can certainly implement it as a
> "read+write", but that wouldn't be any better than doing it in user space
> and could potentially be worse (especially when it comes to error
> reporting etc, but potentially also for buffering and thus performance).

Even if just now we don't see a way how to implement the other cases
faster, you cannot deny in-kernel copying of other types of fd's would be
useful for some apps and maybe worth of implementing in the future. Therefore
it's wise to implement it at least by read/write now and improve it later,
so that applications won't need to be changed again as the kernel evolves.

Aside from the error handling problems, read/write in kernel space will be
still a bit faster (syscall latency etc.), although the speedup doesn't
seem to be too interesting.

Have a nice fortnight

-- 
Martin `MJ' Mares   <mj@ucw.cz>   http://atrey.karlin.mff.cuni.cz/~mj/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
"ADA -- A Dumb Acronym"

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