Sonny Rao c8b74c2f66 mm: fix calculation of dirtyable memory
The system uses global_dirtyable_memory() to calculate number of
dirtyable pages/pages that can be allocated to the page cache.  A bug
causes an underflow thus making the page count look like a big unsigned
number.  This in turn confuses the dirty writeback throttling to
aggressively write back pages as they become dirty (usually 1 page at a
time).  This generally only affects systems with highmem because the
underflowed count gets subtracted from the global count of dirtyable
memory.

The problem was introduced with v3.2-4896-gab8fabd

Fix is to ensure we don't get an underflowed total of either highmem or
global dirtyable memory.

Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Signed-off-by: Puneet Kumar <puneetster@chromium.org>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Tested-by: Damien Wyart <damien.wyart@free.fr>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-12-20 17:40:18 -08:00
..
2012-05-29 23:28:33 -04:00
2012-01-03 22:54:56 -05:00
2011-07-26 16:49:47 -07:00
2012-12-16 15:18:08 -08:00
2012-12-20 07:06:56 -08:00
2012-12-18 15:02:14 -08:00
2012-12-16 15:18:08 -08:00
2012-12-17 17:15:17 -08:00
2012-12-16 15:18:08 -08:00
2012-10-09 16:23:03 +09:00
2012-12-16 15:18:08 -08:00
2012-12-16 15:18:08 -08:00
2012-06-20 14:39:36 -07:00
2012-12-16 15:18:08 -08:00
2012-12-18 15:02:14 -08:00
2012-12-18 15:02:14 -08:00
2012-10-09 16:22:55 +09:00
2012-10-28 19:29:19 +01:00
2012-12-16 15:18:08 -08:00