lkml.org 
[lkml]   [2009]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 22/43] CacheFiles: Add a hook to write a single page of data to an inode [ver #46]
Date
Christoph Hellwig <hch@infradead.org> wrote:

> > I don't think "write_one_page" sounds like a particularly good new
> > API addition.
>
> I also thing it's not a nice one. I still haven't seen a really good
> explanation of why it can't just use plain ->write

->write requires:

(1) A struct file. Refer to the ENFILE problem that my patch to do this
raised. The problem is that doing a tar of, say, a kernel tree
immediately opens ~30000 files internally, and then userspace falls over
with ENFILE all over the place. My tests multiply that by 8.

You (at least I think it was you) refused to countenance allocating file
structs internally to the kernel that weren't accounted.

(2) A pointer to a buffer. That means kmapping a page for the duration of
the write.

->write is quite heavy. For something like ext3 it goes down through quite a
few layers, in and out of the fs, VM and VFS. All this takes both time and
stack space.

I want to write a whole page from the kernel at a page-boundary in the file.
That means it is possible to use an extremely optimised aop to do that.

Really, what I want to do is have the filesystem issue its BIOs directly on
the netfs page, but the Ext3 people I talked to at the time thought that would
be too difficult to track.

David


\
 
 \ /
  Last update: 2009-04-02 19:25    [W:0.182 / U:0.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site