xfs-masters
[Top] [All Lists]

[xfs-masters] [patch 1/2] fs/xfs_buf: replace schedule_timeout() with ms

To: xfs-masters@xxxxxxxxxxx
Subject: [xfs-masters] [patch 1/2] fs/xfs_buf: replace schedule_timeout() with msleep()
From: domen@xxxxxxxxxxxx
Date: Sun, 06 Mar 2005 11:39:56 +0100
Cc: nathans@xxxxxxx, linux-xfs@xxxxxxxxxxx, domen@xxxxxxxxxxxx, nacc@xxxxxxxxxx
Reply-to: xfs-masters@xxxxxxxxxxx
Sender: xfs-masters-bounce@xxxxxxxxxxx


Use msleep() instead of schedule_timeout() to guarantee the task
delays as expected. The current code uses TASK_INTERRUPTIBLE, but does not check
for signals, so I believe the change to msleep() is appropriate.

Signed-off-by: Nishanth Aravamudan <nacc@xxxxxxxxxx>
Signed-off-by: Domen Puncer <domen@xxxxxxxxxxxx>
---


 kj-domen/fs/xfs/linux-2.6/xfs_buf.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN fs/xfs/linux-2.6/xfs_buf.c~msleep-fs_xfs_linux-2.6_xfs_buf 
fs/xfs/linux-2.6/xfs_buf.c
--- kj/fs/xfs/linux-2.6/xfs_buf.c~msleep-fs_xfs_linux-2.6_xfs_buf       
2005-03-05 16:10:57.000000000 +0100
+++ kj-domen/fs/xfs/linux-2.6/xfs_buf.c 2005-03-05 16:10:57.000000000 +0100
@@ -54,6 +54,7 @@
 #include <linux/percpu.h>
 #include <linux/blkdev.h>
 #include <linux/hash.h>
+#include <linux/delay.h>
 
 #include "xfs_linux.h"
 
@@ -1779,8 +1780,7 @@ pagebuf_daemon(
        do {
                try_to_freeze(PF_FREEZE);
 
-               set_current_state(TASK_INTERRUPTIBLE);
-               schedule_timeout((xfs_buf_timer_centisecs * HZ) / 100);
+               msleep(xfs_buf_timer_centisecs * 10);
 
                age = (xfs_buf_age_centisecs * HZ) / 100;
                spin_lock(&pbd_delwrite_lock);
_


<Prev in Thread] Current Thread [Next in Thread>
  • [xfs-masters] [patch 1/2] fs/xfs_buf: replace schedule_timeout() with msleep(), domen <=