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:	Fri, 7 May 2010 07:53:30 -0600
From:	Matthew Wilcox <matthew@....cx>
To:	Phillip Susi <psusi@....rr.com>
Cc:	linux-fsdevel@...r.kernel.org,
	Linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: unified page and buffer cache? (was: readahead on directories)

On Fri, May 07, 2010 at 09:38:19AM -0400, Phillip Susi wrote:
> I thought that the buffer and page caches were unified long ago, but
> last night I modified ureadahead to call readahead() directly on the
> block device for all physical extents involved rather than open() each
> file and readahead() on that.  It read all of the related blocks into
> the buffer cache nice and fast, which was then ignored and the data was
> read again when accessed normally during boot.
> 
> So it seems that the buffer cache and page cache are still separate, and
> normal files only use the page cache, and directories only use the
> buffer cache, which is why readahead() fails when called on a directory.
> 
> Can anyone confirm that my disappointed understanding is correct?  I
> started experimenting with a workaround where I readahead directories
> via the block device, and normal files the normal way.  This seems to do
> the trick, but is sub optimal since you have to read in two passes,
> picking up the directories on the first pass, then going back for the files.

The problem you're seeing is aliasing in the page cache, not a failed
unification of the buffer and page caches.  Pages are addressed by
(mapping, offset).  Each inode generally has its own mapping.  Depending
on the file system, directories may be addressed by their own inode's
mapping, or by the block device's mapping.

Resolving aliasing would be horribly expensive, so it's unlikely to
happen.

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
--
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