lkml.org 
[lkml]   [2001]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] balance_dirty_state() fix
Hi Linus,

The following patch fixes a problem where bdflush eats too
much cpu time without getting work done; the problem is that
calls to page_launder() don't achieve anything in the short
term and may not even achieve anything long-term because we
may just be short on inactive pages.

In both of these cases it's better to just let bdflush stop
eating CPU and have the system do something useful instead.
Please apply.

regards,

Rik
--
Virtual memory is like a game you can't win;
However, without VM there's truly nothing to lose...

http://www.surriel.com/ http://distro.conectiva.com/

Send all your spam to aardvark@nl.linux.org (spam digging piggy)


--- linux-2.4.4/fs/buffer.c.orig Mon May 14 00:36:15 2001
+++ linux-2.4.4/fs/buffer.c Mon May 14 00:36:28 2001
@@ -1034,7 +1034,6 @@
int balance_dirty_state(kdev_t dev)
{
unsigned long dirty, tot, hard_dirty_limit, soft_dirty_limit;
- int shortage;

dirty = size_buffers_type[BUF_DIRTY] >> PAGE_SHIFT;
tot = nr_free_buffer_pages();
@@ -1049,16 +1048,6 @@
return 1;
return 0;
}
-
- /*
- * If we are about to get low on free pages and
- * cleaning the inactive_dirty pages would help
- * fix this, wake up bdflush.
- */
- shortage = free_shortage();
- if (shortage && nr_inactive_dirty_pages > shortage &&
- nr_inactive_dirty_pages > freepages.high)
- return 0;

return -1;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:52    [W:0.051 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site