lkml.org 
[lkml]   [2021]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] percpu_counter: increase batch count
From
Date
On 2/18/21 4:16 PM, Andrew Morton wrote:
> On Thu, 18 Feb 2021 14:36:31 -0700 Jens Axboe <axboe@kernel.dk> wrote:
>
>> Currently we cap the batch count at max(32, 2*nr_online_cpus), which these
>> days is kind of silly as systems have gotten much bigger than in 2009 when
>> this heuristic was introduced.
>>
>> Bump it to capping it at 256 instead. This has a noticeable improvement
>> for certain io_uring workloads, as io_uring tracks per-task inflight count
>> using percpu counters.
>>
>
> It will also make percpu_counter_read() and
> percpu_counter_read_positive() more inaccurate than at present. Any
> effects from this will take a while to discover.

It will, but the value of 32 is very low, especially when you are potentially
doing millions of these per second. So I do think it should track the times
a bit.

> But yes, worth trying - I'll add it to the post-rc1 pile.

Thanks!

--
Jens Axboe

\
 
 \ /
  Last update: 2021-02-19 00:25    [W:0.101 / U:0.832 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site