Re: Thread implementations...

Pavel Machek (pavel@Elf.ucw.cz)
Fri, 26 Jun 1998 00:19:16 +0200


Hi!

> 3) You can read my writeup of how I thought I/O ought to be done after
> doing it at SGI for a while, it's in
>
> ftp://ftp.bitmover.com/pub/splice.ps.gz (also splice.ps)
>
> It's not what I'd call detailed, but it is interesting reading and I'd
> love to discuss the idea with you at length. Stephen Tweedie and I
> started to talk about it at Linux Expo; maybe he has some thoughts
> he cares to share?

Yes: Maybe error handling could be done this way:

splice( from, to, __u64 size, struct error *errors )

struct error {
int actually_read;
int actually_writen;
int error_read;
int error_write;
}

if, and only if kernel encounters a error, it writes it into
structure. If everything is ok, splice just returns number of bytes
copied and does not care about errors pointer at all. If it has error,
it carefully fills the structure and then returns EIO (for
example).

Data that were read but not written should probably be lost. If we
don't like this, we could pass pointer/len pair so kernel could write
unwritten data somewhere. But I think we should better lose that data.

Pavel

-- 
I'm really pavel@atrey.karlin.mff.cuni.cz. 	   Pavel
Look at http://atrey.karlin.mff.cuni.cz/~pavel/ ;-).

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