Commit 77fad5e625e56eb31a343ae1d489979fdc61a2aa
Committed by
Jens Axboe
1 parent
deed62edff
Exists in
master
and in
7 other branches
writeback: improve scalability of bdi writeback work queues
If you're going to do an atomic RMW on each list entry, there's not much point in all the RCU complexities of the list walking. This is only going to help the multi-thread case I guess, but it doesn't hurt to do now. Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff
fs/fs-writeback.c
... | ... | @@ -772,8 +772,9 @@ |
772 | 772 | rcu_read_lock(); |
773 | 773 | |
774 | 774 | list_for_each_entry_rcu(work, &bdi->work_list, list) { |
775 | - if (!test_and_clear_bit(wb->nr, &work->seen)) | |
775 | + if (!test_bit(wb->nr, &work->seen)) | |
776 | 776 | continue; |
777 | + clear_bit(wb->nr, &work->seen); | |
777 | 778 | |
778 | 779 | ret = work; |
779 | 780 | break; |