]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ext4: Use schedule_timeout_interruptible() for waiting in lazyinit thread
authorLukas Czerner <lczerner@redhat.com>
Fri, 20 May 2011 17:49:04 +0000 (13:49 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 3 Jun 2011 01:34:49 +0000 (10:34 +0900)
commitad106f8c9b2493de31e4b560b9aac000aa81ba10
treecd64f8c718d8832887d339bc5573e375f39caf51
parentabe87a0b0ba5a0cddfab30bbafc6e2b121537b15
ext4: Use schedule_timeout_interruptible() for waiting in lazyinit thread

commit 4ed5c033c11b33149d993734a6a8de1016e8f03f upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ext4/ext4.h
fs/ext4/super.c