Re: OT: why no file copy() libc/syscall ??

From: H. Peter Anvin
Date: Thu Nov 13 2003 - 19:39:00 EST


Andrea Arcangeli wrote:
>
> I actually hacked cp for a while and it improved cp some point percent
> on normal machines.
>
> See ftp://ftp.suse.com/pub/people/andrea/cp-sendfile/
>
> the main downside and the reason it wasn't applied IIRC is the lack of
> interruption of sendfile, basically for an huge file it would take a
> while before C^c has any effect. The kernel isn't interrupting the
> syscall. This is no different from a huge read or write syscall (but
> read/write are never huge or the buffer would need to be huge too, not
> the case for sendfile that works zerocopy), so in theory we could
> workaround it by entering/exiting kernel multiple times just to allow
> the signal to be handled like in the read/write case.

... or we could put in checks into the kernel for signal pending, and
return EINTR.

-hpa

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/