lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 02 Apr 2009 18:22:32 +0100
From:	David Howells <dhowells@...hat.com>
To:	Christoph Hellwig <hch@...radead.org>
Cc:	dhowells@...hat.com, Nick Piggin <nickpiggin@...oo.com.au>,
	viro@...iv.linux.org.uk, nfsv4@...ux-nfs.org,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 22/43] CacheFiles: Add a hook to write a single page of data to an inode [ver #46]

Christoph Hellwig <hch@...radead.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ