Re: [PATCH] sendfile removal



On Thu, May 31 2007, Tom Zanussi wrote:
On Thu, 2007-05-31 at 12:33 +0200, Jens Axboe wrote:
Hi,

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.

- 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.


Hi Jens,

Yeah, I have it lying around somewhere - the patch I sent you awhile
back of an initial version of splice_read() is the last work I did on
this. Basically, it worked OK but IIRC there were a couple things in
the code that needed fixing. I also modified blktrace to use splice so
I could use it for testing; I'll send a patch for that too once I get it
working again.

Anyway, that was ages ago (sometime last year ;-) so I'm going to have
to dig up the code and probably rework it a bit.

It'd be great if you can polish it a bit (basically just make it apply
to the current kernel). I don't think it's hard, aside from moving the
code from fs/relayfs/ to kernel/relay.c, there hasn't been many changes.

--
Jens Axboe

-
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/



Relevant Pages

  • Re: blktrace/relay/s390: Oops in subbuf_splice_actor
    ... On Wed, Apr 23 2008, Tom Zanussi wrote: ... unsigned int this_len, this_end, private; ... With the patch, i can run dd and 'blktrace -h traceserver' without the ...
    (Linux-Kernel)
  • Re: blktrace/relay/s390: Oops in subbuf_splice_actor
    ... On Mon, Apr 07 2008, Tom Zanussi wrote: ... unsigned int this_len, this_end, private; ... With the patch, i can run dd and 'blktrace -h traceserver' without the ...
    (Linux-Kernel)
  • Re: [PATCH] relay: add buffer-only functionality, allowing for early kernel tracing
    ... to try it. I've added Tom Zanussi, the author of relay, who might ... I've tested my patch a bit more and ran into a problem, ... along with a piece of code from my GSoC project that ... uses the early relay interface. ...
    (Linux-Kernel)
  • Re: [PATCH] sendfile removal
    ... This patch removes the ->sendfilehook from the file_operations ... There should be no functional changes. ... Any chance this can be converted to splice, ... I have it lying around somewhere - the patch I sent you awhile ...
    (Linux-Kernel)
  • Re: [PATCH] Relay CPU Hotplug support
    ... > Here is a patch, result of the combined work of Tom Zanussi and myself, to add ... > This patch applies on 2.6.20-rc1-git7. ... If the create_buf_filecallback fails, or isn't defined, channel ...
    (Linux-Kernel)