On Thu, Jan 19, 2006 at 03:11:45PM -0000, Andy Chittenden wrote:
> DMA free:20kB min:24kB low:28kB high:36kB active:0kB inactive:0kB
> present:12740kB pages_scanned:4 all_unreclaimable? yes
Note we only scanned 4 pages before we gave up.
Larry Woodman came up with this patch below that clears all_unreclaimable
when in two places where we've made progress at freeing up some pages
which has helped oom situations for some of our users.
From: Larry Woodman <[email protected]>
Signed-off-by: Dave Jones <[email protected]>
--- linux-2.6/mm/filemap.c~ 2005-12-10 01:47:15.000000000 -0500
+++ linux-2.6/mm/filemap.c 2005-12-10 01:47:46.000000000 -0500
@@ -471,11 +471,18 @@ EXPORT_SYMBOL(unlock_page);
*/
void end_page_writeback(struct page *page)
{
+ struct zone *zone = page_zone(page);
if (!TestClearPageReclaim(page) || rotate_reclaimable_page(page)) {
if (!test_clear_page_writeback(page))
BUG();
}
smp_mb__after_clear_bit();
+ if (zone->all_unreclaimable) {
+ spin_lock(&zone->lock);
+ zone->all_unreclaimable = 0;
+ zone->pages_scanned = 0;
+ spin_unlock(&zone->lock);
+ }
wake_up_page(page, PG_writeback);
}
EXPORT_SYMBOL(end_page_writeback);
--- linux-2.6.15/mm/page_alloc.c~ 2006-01-09 13:40:03.000000000 -0500
+++ linux-2.6.15/mm/page_alloc.c 2006-01-09 13:40:50.000000000 -0500
@@ -722,6 +722,11 @@ static void fastcall free_hot_cold_page(
if (pcp->count >= pcp->high) {
free_pages_bulk(zone, pcp->batch, &pcp->list, 0);
pcp->count -= pcp->batch;
+ } else if (zone->all_unreclaimable) {
+ spin_lock(&zone->lock);
+ zone->all_unreclaimable = 0;
+ zone->pages_scanned = 0;
+ spin_unlock(&zone->lock);
}
local_irq_restore(flags);
put_cpu();
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]