Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131832
b: refs/heads/master
c: efab0b5
h: refs/heads/master
v: v3
  • Loading branch information
Andres Salomon authored and David Woodhouse committed Feb 14, 2009
1 parent 041b968 commit 5366f93
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ab00d68276295a1b4da7ad924a35a3566e9c2698
refs/heads/master: efab0b5d3eed6aa71f8e3233e4e11774eedc04dc
18 changes: 11 additions & 7 deletions trunk/fs/jffs2/background.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down

0 comments on commit 5366f93

Please sign in to comment.