]> git.neil.brown.name Git - history.git/commit
[PATCH] no-buffer-head ext2 option
authorAndrew Morton <akpm@digeo.com>
Fri, 22 Nov 2002 03:32:45 +0000 (19:32 -0800)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Fri, 22 Nov 2002 03:32:45 +0000 (19:32 -0800)
commitb1ad1f4efce23ad0801492c0d5ffa8c0aa6a8cdb
tree9c85c0ffe33fb8c8ab1e27e64502de1e2cff29ae
parent36fb7f8459cc42eca202f0ad7b2d051359406d57
[PATCH] no-buffer-head ext2 option

Implements a new set of block address_space_operations which will never
attach buffer_heads to file pagecache.  These can be turned on for ext2
with the `nobh' mount option.

During write-intensive testing on a 7G machine, total buffer_head
storage remained below 0.3 megabytes.  And those buffer_heads are
against ZONE_NORMAL pagecache and will be reclaimed by ZONE_NORMAL
memory pressure.

This work is, of course, a special for the huge highmem machines.
Possibly it obsoletes the buffer_heads_over_limit stuff (which doesn't
work terribly well), but that code is simple, and will provide relief
for other filesystems.

It should be noted that the nobh_prepare_write() function and the
PageMappedToDisk() infrastructure is what is needed to solve the
problem of user data corruption when the filesystem which backs a
sparse MAP_SHARED mapping runs out of space.  We can use this code in
filemap_nopage() to ensure that all mapped pages have space allocated
on-disk.  Deliver SIGBUS on ENOSPC.

This will require a new address_space op, I expect.
fs/buffer.c
fs/ext2/ext2.h
fs/ext2/inode.c
fs/ext2/namei.c
fs/ext2/super.c
fs/mpage.c
include/linux/buffer_head.h
include/linux/ext2_fs.h
include/linux/page-flags.h
mm/page_alloc.c
mm/truncate.c