Re: [PATCH] btrfs: use percpu_read_positive instead of sum_positive for need_preempt

2021-03-29 Thread David Sterba
On Wed, Mar 24, 2021 at 09:44:21AM -0400, Josef Bacik wrote: > Looking at perf data for a fio workload I noticed that we were spending > a pretty large chunk of time (around 5%) doing percpu_counter_sum() in > need_preemptive_reclaim. This is silly, as we only want to know if we > have more ordere

[PATCH] btrfs: use percpu_read_positive instead of sum_positive for need_preempt

2021-03-24 Thread Josef Bacik
Looking at perf data for a fio workload I noticed that we were spending a pretty large chunk of time (around 5%) doing percpu_counter_sum() in need_preemptive_reclaim. This is silly, as we only want to know if we have more ordered than delalloc to see if we should be counting the delayed items in