aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/ext4.h
diff options
context:
space:
mode:
authorLukas Czerner <lczerner@redhat.com>2011-05-20 13:49:04 -0400
committerTheodore Ts'o <tytso@mit.edu>2011-05-20 13:49:04 -0400
commit4ed5c033c11b33149d993734a6a8de1016e8f03f (patch)
tree826892fddc9cef7cbfac541eb13bb8eebc95c539 /fs/ext4/ext4.h
parent0e499890c1fd9e0a1bed02002161c4c7873d7489 (diff)
ext4: Use schedule_timeout_interruptible() for waiting in lazyinit thread
In order to make lazyinit eat approx. 10% of io bandwidth at max, we are sleeping between zeroing each single inode table. For that purpose we are using timer which wakes up thread when it expires. It is set via add_timer() and this may cause troubles in the case that thread has been woken up earlier and in next iteration we call add_timer() on still running timer hence hitting BUG_ON in add_timer(). We could fix that by using mod_timer() instead however we can use schedule_timeout_interruptible() for waiting and hence simplifying things a lot. This commit exchange the old "waiting mechanism" with simple schedule_timeout_interruptible(), setting the time to sleep. Hence we do not longer need li_wait_daemon waiting queue and others, so get rid of it. Addresses-Red-Hat-Bugzilla: #699708 Signed-off-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r--fs/ext4/ext4.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 47986ae8dcec..579dfeda614c 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1605,12 +1605,8 @@ void ext4_get_group_no_and_offset(struct super_block *sb, ext4_fsblk_t blocknr,
1605 */ 1605 */
1606struct ext4_lazy_init { 1606struct ext4_lazy_init {
1607 unsigned long li_state; 1607 unsigned long li_state;
1608
1609 wait_queue_head_t li_wait_daemon;
1610 wait_queue_head_t li_wait_task; 1608 wait_queue_head_t li_wait_task;
1611 struct timer_list li_timer;
1612 struct task_struct *li_task; 1609 struct task_struct *li_task;
1613
1614 struct list_head li_request_list; 1610 struct list_head li_request_list;
1615 struct mutex li_list_mtx; 1611 struct mutex li_list_mtx;
1616}; 1612};