From: Dave Chinner <david@fromorbit.com>
To: Waiman Long <longman@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Alexey Dobriyan <adobriyan@gmail.com>,
Luis Chamberlain <mcgrof@kernel.org>,
Kees Cook <keescook@chromium.org>,
Jonathan Corbet <corbet@lwn.net>,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
linux-fsdevel@vger.kernel.org,
Davidlohr Bueso <dave@stgolabs.net>,
Miklos Szeredi <miklos@szeredi.hu>,
Daniel Colascione <dancol@google.com>,
Randy Dunlap <rdunlap@infradead.org>
Subject: Re: [PATCH 0/2] /proc/stat: Reduce irqs counting performance overhead
Date: Tue, 8 Jan 2019 09:32:14 +1100 [thread overview]
Message-ID: <20190107223214.GZ6311@dastard> (raw)
In-Reply-To: <1546873978-27797-1-git-send-email-longman@redhat.com>
On Mon, Jan 07, 2019 at 10:12:56AM -0500, Waiman Long wrote:
> As newer systems have more and more IRQs and CPUs available in their
> system, the performance of reading /proc/stat frequently is getting
> worse and worse.
Because the "roll-your-own" per-cpu counter implementaiton has been
optimised for low possible addition overhead on the premise that
summing the counters is rare and isn't a performance issue. This
patchset is a direct indication that this "summing is rare and can
be slow" premise is now invalid.
We have percpu counter infrastructure that trades off a small amount
of addition overhead for zero-cost reading of the counter value.
i.e. why not just convert this whole mess to percpu_counters and
then just use percpu_counter_read_positive()? Then we just don't
care how often userspace reads the /proc file because there is no
summing involved at all...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2019-01-07 22:32 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-07 15:12 [PATCH 0/2] /proc/stat: Reduce irqs counting performance overhead Waiman Long
2019-01-07 15:12 ` [PATCH 1/2] /proc/stat: Extract irqs counting code into show_stat_irqs() Waiman Long
2019-01-07 21:42 ` Kees Cook
2019-01-07 15:12 ` [PATCH 2/2] /proc/stat: Add sysctl parameter to control irq counts latency Waiman Long
2019-01-07 15:58 ` Matthew Wilcox
2019-01-07 16:07 ` Waiman Long
2019-01-07 16:14 ` Matthew Wilcox
2019-01-07 16:19 ` Waiman Long
2019-01-07 16:33 ` Alexey Dobriyan
2019-01-07 16:59 ` Waiman Long
2019-01-18 8:44 ` [/proc/stat] 3047027b34: reaim.jobs_per_min -4.8% regression kernel test robot
2019-01-18 8:44 ` [LKP] " kernel test robot
2019-01-21 20:02 ` Kees Cook
2019-01-21 20:02 ` Kees Cook
2019-01-21 21:25 ` [LKP] " Alexey Dobriyan
2019-01-21 21:25 ` Alexey Dobriyan
2019-01-07 22:32 ` Dave Chinner [this message]
2019-01-07 22:41 ` [PATCH 0/2] /proc/stat: Reduce irqs counting performance overhead Daniel Colascione
2019-01-07 23:49 ` Alexey Dobriyan
2019-01-07 22:41 ` Waiman Long
2019-01-08 2:04 ` Dave Chinner
2019-01-08 16:11 ` Michal Hocko
2019-01-08 17:05 ` Waiman Long
2019-01-08 17:32 ` Waiman Long
2019-01-08 16:58 ` Waiman Long
2019-01-08 22:27 ` Dave Chinner
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=20190107223214.GZ6311@dastard \
--to=david@fromorbit.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=dancol@google.com \
--cc=dave@stgolabs.net \
--cc=keescook@chromium.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mcgrof@kernel.org \
--cc=miklos@szeredi.hu \
--cc=rdunlap@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.