linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* sendfile system call on tmpfs
@ 2003-08-07 12:28 Theewara Vorakosit
  2003-08-07 13:09 ` Hugh Dickins
  0 siblings, 1 reply; 3+ messages in thread
From: Theewara Vorakosit @ 2003-08-07 12:28 UTC (permalink / raw)
  To: linux-kernel

Dear All,
	I use linux redhat 9 with kernal 2.4.20-13.9smp. I try to use
sendfile system. I found that on ext3 file system, it works fine.
However, on tmpfs, it error with "Invalid argument". Does sendfile()
support on tmpfs or other filesystem?
Thanks,
Theewara


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: sendfile system call on tmpfs
  2003-08-07 12:28 sendfile system call on tmpfs Theewara Vorakosit
@ 2003-08-07 13:09 ` Hugh Dickins
  2003-08-09  1:51   ` Jamie Lokier
  0 siblings, 1 reply; 3+ messages in thread
From: Hugh Dickins @ 2003-08-07 13:09 UTC (permalink / raw)
  To: Theewara Vorakosit; +Cc: linux-kernel

On Thu, 7 Aug 2003, Theewara Vorakosit wrote:
> 	I use linux redhat 9 with kernal 2.4.20-13.9smp. I try to use
> sendfile system. I found that on ext3 file system, it works fine.
> However, on tmpfs, it error with "Invalid argument". Does sendfile()
> support on tmpfs or other filesystem?

The 2.4 tmpfs did not support sendfile (or loop) until 2.4.22-pre3,
so Red Hat's 2.4.20-13.9smp won't do it.

If you're at ease with patching the kernel source and rebuilding your
kernel, please let me know: I should be able to send you the necessary
patch (mainly mm/shmem.c) to add those features into your Red Hat 9 tmpfs.

Hugh


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: sendfile system call on tmpfs
  2003-08-07 13:09 ` Hugh Dickins
@ 2003-08-09  1:51   ` Jamie Lokier
  0 siblings, 0 replies; 3+ messages in thread
From: Jamie Lokier @ 2003-08-09  1:51 UTC (permalink / raw)
  To: Hugh Dickins; +Cc: Theewara Vorakosit, linux-kernel

Hugh Dickins wrote:
> The 2.4 tmpfs did not support sendfile (or loop) until 2.4.22-pre3,
> so Red Hat's 2.4.20-13.9smp won't do it.

Oh.  Does this mean that it is faster to serve program-generated data
by mmaping an ext3 file and using sendfile() on that, than to call
write() from anonymous memory?  The former does zero-copy, the latter
doesn't.  Unfortunately the former might write to disk, though you
don't want it too.

-- Jamie

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-08-09  1:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-07 12:28 sendfile system call on tmpfs Theewara Vorakosit
2003-08-07 13:09 ` Hugh Dickins
2003-08-09  1:51   ` Jamie Lokier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).