diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-26 14:45:57 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-26 14:45:57 -0800 |
commit | 221be177e68e197a946bb991c8b91468e960be4e (patch) | |
tree | f77313df6358700d58cc7921551400170a8f6700 /fs/jffs2/background.c | |
parent | d49981150387c481779a544ec641f17882f4bbfb (diff) | |
parent | b50be33e42e2c87812b30aee1a2b2a5ac6cb3ffa (diff) |
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6:
[MTD] [MAPS] Remove MODULE_DEVICE_TABLE() from ck804rom driver.
[JFFS2] fix mount crash caused by removed nodes
[JFFS2] force the jffs2 GC daemon to behave a bit better
[MTD] [MAPS] blackfin async requires complex mappings
[MTD] [MAPS] blackfin: fix memory leak in error path
[MTD] [MAPS] physmap: fix wrong free and del_mtd_{partition,device}
[MTD] slram: Handle negative devlength correctly
[MTD] map_rom has NULL erase pointer
[MTD] [LPDDR] qinfo_probe depends on lpddr
Diffstat (limited to 'fs/jffs2/background.c')
-rw-r--r-- | fs/jffs2/background.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/fs/jffs2/background.c b/fs/jffs2/background.c index 3cceef4ad2b..e9580104b6b 100644 --- a/fs/jffs2/background.c +++ b/fs/jffs2/background.c @@ -95,13 +95,17 @@ static int jffs2_garbage_collect_thread(void *_c) spin_unlock(&c->erase_completion_lock); - /* This thread is purely an optimisation. But if it runs when - other things could be running, it actually makes things a - lot worse. Use yield() and put it at the back of the runqueue - every time. Especially during boot, pulling an inode in - with read_inode() is much preferable to having the GC thread - get there first. */ - yield(); + /* Problem - immediately after bootup, the GCD spends a lot + * of time in places like jffs2_kill_fragtree(); so much so + * that userspace processes (like gdm and X) are starved + * despite plenty of cond_resched()s and renicing. Yield() + * doesn't help, either (presumably because userspace and GCD + * are generally competing for a higher latency resource - + * disk). + * This forces the GCD to slow the hell down. Pulling an + * inode in with read_inode() is much preferable to having + * the GC thread get there first. */ + schedule_timeout_interruptible(msecs_to_jiffies(50)); /* Put_super will send a SIGKILL and then wait on the sem. */ |