linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] Add check for dirty_writeback_interval in bdi_wakeup_thread_delayed
@ 2011-04-17 16:23 Raghavendra D Prabhu
  2011-04-18  0:02 ` Dave Chinner
  2011-04-18  7:19 ` Artem Bityutskiy
  0 siblings, 2 replies; 7+ messages in thread
From: Raghavendra D Prabhu @ 2011-04-17 16:23 UTC (permalink / raw)
  To: linux-mm
  Cc: Artem Bityutskiy, Jens Axboe, Christoph Hellwig, Andrew Morton,
	linux-kernel

In the function bdi_wakeup_thread_delayed, no checks are performed on
dirty_writeback_interval unlike other places and timeout is being set to
zero as result, thus defeating the purpose. So, I have changed it to be
passed default value of interval which is 500 centiseconds, when it is
set to zero.
I have also verified this and tested it.

Signed-off-by: Raghavendra D Prabhu <rprabhu@wnohang.net>
---
  mm/backing-dev.c |    5 ++++-
  1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index befc875..d06533c 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -336,7 +336,10 @@ void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi)
  {
  	unsigned long timeout;
  
-	timeout = msecs_to_jiffies(dirty_writeback_interval * 10);
+	if (dirty_writeback_interval)
+		timeout = msecs_to_jiffies(dirty_writeback_interval * 10);
+	else
+		timeout = msecs_to_jiffies(5000);
  	mod_timer(&bdi->wb.wakeup_timer, jiffies + timeout);
  }
  
-- 
1.7.4.4

--------------------------
Raghavendra Prabhu
GPG Id : D72BE977

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-04-20 19:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-17 16:23 [PATCH 1/1] Add check for dirty_writeback_interval in bdi_wakeup_thread_delayed Raghavendra D Prabhu
2011-04-18  0:02 ` Dave Chinner
2011-04-18  7:08   ` [TOME] " Raghavendra D Prabhu
2011-04-18  7:19 ` Artem Bityutskiy
2011-04-18  9:16   ` Raghavendra D Prabhu
2011-04-18 12:26     ` Artem Bityutskiy
2011-04-20 19:17       ` Raghavendra D Prabhu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).