Messages in this thread |  | | From | Christoph Rohland <> | Subject | Re: tmpfs + sendfile bug ? | Date | 22 May 2001 08:50:11 +0200 |
| |
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
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |