Staging
v0.5.1
https://github.com/torvalds/linux
Revision dc6e29da9162fa8fa2a9e798569c0f6e87975614 authored by Linus Torvalds on 30 January 2007, 00:37:38 UTC, committed by Linus Torvalds on 30 January 2007, 00:37:38 UTC
This makes balance_dirty_page() always base its calculations on the
amount of non-highmem memory in the machine, rather than try to base it
on total memory and then falling back on non-highmem memory if the
mapping it was writing wasn't highmem capable.

This not only fixes a situation where two different writers can have
wildly different notions about what is a "balanced" dirty state, but it
also means that people with highmem machines don't run into an OOM
situation when regular memory fills up with dirty pages.

We used to try to handle the latter case by scaling down the dirty_ratio
if the machine had a lot of highmem pages in page_writeback_init(), but
it wasn't aggressive enough for some situations, and since basing the
dirty ratio on highmem memory was broken in the first place, let's just
stop doing so.

(A variation of this theme fixed Justin Piszcz's OOM problem when
copying an 18GB file on a RAID setup).

Acked-by: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Justin Piszcz <jpiszcz@lucidpixels.com>
Cc: Andrew Morton <akpm@osdl.org>
Cc: Neil Brown <neilb@suse.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 5263bf6
History
Tip revision: dc6e29da9162fa8fa2a9e798569c0f6e87975614 authored by Linus Torvalds on 30 January 2007, 00:37:38 UTC
Fix balance_dirty_page() calculations with CONFIG_HIGHMEM
Tip revision: dc6e29d
File Mode Size
Documentation
arch
block
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
scripts
security
sound
usr
.gitignore -rw-r--r-- 572 bytes
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 88.5 KB
Kbuild -rw-r--r-- 1.2 KB
MAINTAINERS -rw-r--r-- 80.1 KB
Makefile -rw-r--r-- 49.1 KB
README -rw-r--r-- 16.5 KB
REPORTING-BUGS -rw-r--r-- 3.0 KB

README

back to top