Re: [PATCH] sendfile removal
- From: Hugh Dickins <hugh@xxxxxxxxxxx>
- Date: Thu, 31 May 2007 18:06:19 +0100 (BST)
On Thu, 31 May 2007, Jens Axboe wrote:
This patch removes the ->sendfile() hook from the file_operations
structure, and replaces the sys_sendfile() mechanism to be based on
->splice_read() instead. There should be no functional changes.
Work to be done:
- The ext2 xip support needs a splice_read() implementation, currently I
just if 0'ed out the send xip_file_sendfile(). CC'ed Carsten, who
seems to be the author of this code.
- shmem needs a splice_read() implementation. Optimistically CC'ed Hugh.
I'll take that "Optimistically" as a special compliment,
rather than as a particular insult ;)
Yes, thanks, please leave shmem_file_splice_read() to me, I'll give
it priority now. Not deep enough in yet, but I'll probably aim for
something simple-minded (correct but slow once it hits swap).
- nfds: The ->rq_sendfile_ok optimization is gone for now. I can't
determine the value of it, but I'm assuming it's there for a reason.
Any chance this can be converted to splice, or use something else than
->sendfile()? CC'ed Neil.
- relay: needs a splice_read() implementation. I think Tom already has
one, CC'ed him.
Apart from that, it was mostly straight forward. Almost everybody uses
generic_file_sendfile(), which makes the conversion easy. I changed loop
to use do_generic_file_read() instead of sendfile, it works for me...
Christoph already picked up on that, and it's of interest to shmem too:
loop over tmpfs in 2.6 was relying on shmem_file_sendfile, for which
the generic route is not good enough.
If we're giving a .splice_read to everything which used to have a
.sendfile, then I think you just need to make do_lo_read() use
->splice_read now?
Hugh
-
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/
- Follow-Ups:
- Re: [PATCH] sendfile removal
- From: Jens Axboe
- Re: [PATCH] sendfile removal
- From: Christoph Hellwig
- Re: [PATCH] sendfile removal
- References:
- [PATCH] sendfile removal
- From: Jens Axboe
- [PATCH] sendfile removal
- Prev by Date: Re: floppy.c soft lockup
- Next by Date: Kernel assertion (BUG) on 2.6.20-1-2316 FC5
- Previous by thread: Re: [PATCH] sendfile removal
- Next by thread: Re: [PATCH] sendfile removal
- Index(es):