diff options
author | Chris Mason <chris.mason@oracle.com> | 2009-10-02 23:11:56 (GMT) |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2009-10-05 13:44:45 (GMT) |
commit | 61d92c328c16419fc96dc50dd16f8b8c695409ec (patch) | |
tree | e9cd82eb56ff5f38f64d9f35229d15496e5d53de /fs/btrfs/extent-tree.c | |
parent | fbf190874407f23d2891b53ffdf7d3c6be8d47ff (diff) | |
download | linux-61d92c328c16419fc96dc50dd16f8b8c695409ec.tar.xz |
Btrfs: fix deadlock on async thread startup
The btrfs async worker threads are used for a wide variety of things,
including processing bio end_io functions. This means that when
the endio threads aren't running, the rest of the FS isn't
able to do the final processing required to clear PageWriteback.
The endio threads also try to exit as they become idle and
start more as the work piles up. The problem is that starting more
threads means kthreadd may need to allocate ram, and that allocation
may wait until the global number of writeback pages on the system is
below a certain limit.
The result of that throttling is that end IO threads wait on
kthreadd, who is waiting on IO to end, which will never happen.
This commit fixes the deadlock by handing off thread startup to a
dedicated thread. It also fixes a bug where the on-demand thread
creation was creating far too many threads because it didn't take into
account threads being started by other procs.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
0 files changed, 0 insertions, 0 deletions