From 96d902af2e7e90e692db51a7d170696d5857adbd Mon Sep 17 00:00:00 2001 From: nikita Date: Wed, 6 Dec 2006 18:56:51 +0000 Subject: [PATCH] tmp-debug: initial jiffies value maybe non-0. --- lustre/kernel_patches/patches/tmp-debug.patch | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lustre/kernel_patches/patches/tmp-debug.patch b/lustre/kernel_patches/patches/tmp-debug.patch index feed65b..660daf8 100644 --- a/lustre/kernel_patches/patches/tmp-debug.patch +++ b/lustre/kernel_patches/patches/tmp-debug.patch @@ -12,14 +12,15 @@ Index: linux/fs/buffer.c /* * Perform a pagecache lookup for the matching buffer. If it's there, refresh * it in the LRU and mark it as accessed. If it is not present then return -@@ -1538,6 +1541,17 @@ __find_get_block(struct block_device *bd +@@ -1538,6 +1541,18 @@ __find_get_block(struct block_device *bd { struct buffer_head *bh = lookup_bh_lru(bdev, block, size); + if (__find_get_block_trace != 0) { -+ static unsigned long last_dump; ++ static unsigned long last_dump = 0; + -+ if (time_after(jiffies, ++ if (last_dump == 0 || ++ time_after(jiffies, + last_dump + __find_get_block_trace * HZ)) { + last_dump = jiffies; + printk("%s@%lu\n", __FUNCTION__, last_dump); @@ -44,14 +45,15 @@ Index: linux/kernel/sched.c /*** * try_to_wake_up - wake up a thread * @p: the to-be-woken-up thread -@@ -1132,6 +1135,17 @@ static int try_to_wake_up(task_t * p, un +@@ -1132,6 +1135,18 @@ static int try_to_wake_up(task_t * p, un int new_cpu; #endif + if (try_to_wake_up_trace != 0) { -+ static unsigned long last_dump; ++ static unsigned long last_dump = 0; + -+ if (time_after(jiffies, ++ if (last_dump == 0 || ++ time_after(jiffies, + last_dump + try_to_wake_up_trace * HZ)) { + last_dump = jiffies; + printk("%s@%lu\n", __FUNCTION__, last_dump); -- 1.8.3.1