From: Jens Axboe <axboe@kernel.dk>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] percpu_counter: increase batch count
Date: Thu, 18 Feb 2021 16:23:47 -0700 [thread overview]
Message-ID: <919b3aa5-7332-0817-3b70-4f20ae6410a8@kernel.dk> (raw)
In-Reply-To: <20210218151644.df430e4f77f763b7db2a004f@linux-foundation.org>
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
next prev parent reply other threads:[~2021-02-18 23:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-18 21:36 Jens Axboe
2021-02-18 23:16 ` Andrew Morton
2021-02-18 23:23 ` Jens Axboe [this message]
2021-02-22 21:31 ` Hugh Dickins
2021-02-22 21:53 ` Jens Axboe
2021-02-22 22:14 ` Hugh Dickins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=919b3aa5-7332-0817-3b70-4f20ae6410a8@kernel.dk \
--to=axboe@kernel.dk \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®