public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Rohland <cr@sap.com>
To: Linus Torvalds <torvalds@transmeta.com>
Subject: Re: tmpfs + sendfile bug ?
Date: 22 May 2001 08:50:11 +0200	[thread overview]
Message-ID: <m3ofslvpwc.fsf@linux.local> (raw)
In-Reply-To: <XFMail.20010521183553.petchema@concept-micro.com> <m3bsomwsgs.fsf@linux.local> <200105212201.PAA17247@penguin.transmeta.com>
In-Reply-To: <200105212201.PAA17247@penguin.transmeta.com>

Hi Linus,

On Mon, 21 May 2001, Linus Torvalds wrote:
> In article <m3bsomwsgs.fsf@linux.local>, Christoph Rohland
> <cr@sap.com> wrote:
>>
>>tmpfs does not provide the necessary functions for sendfile and lo:
>>readpage, prepare_write and commitwrite.
>>
>>And I do not see a way how to provide readpage in tmpfs :-(
> 
> Why not just do it the same way ramfs does?
> 
> If you don't have any backing store, you know that the page is
> empty. If you _do_ have backing store, a readpage() won't be
> called. Ergo:

AFAIU readpage is fine as long as there is no backing store. But if
the page is in the swap cache, the lookup of the page in the page
cache will fail; generic_file_read, loop, sendfile will allocate a
page and call readpage with that. Now readpage has to copy the swap
cache page over to this page :-(

IMHO Copying on swapin is really not worth the additional
functionality.

Did I miss something?

		Christoph



  parent reply	other threads:[~2001-05-22  7:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-21 16:35 tmpfs + sendfile bug ? Pierre Etchemaite
2001-05-21 16:57 ` Christoph Rohland
2001-05-21 22:01   ` Linus Torvalds
     [not found]   ` <200105212201.PAA17247@penguin.transmeta.com>
2001-05-22  6:50     ` Christoph Rohland [this message]
2001-05-21 18:49 ` David Schwartz
2001-05-21 22:44   ` Pierre Etchemaite

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3ofslvpwc.fsf@linux.local \
    --to=cr@sap.com \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox