From: Christopher Lameter <cl@linux.com>
To: Tejun Heo <tj@kernel.org>
Cc: "Jesper Dangaard Brouer" <brouer@redhat.com>,
"Björn Töpel" <bjorn.topel@gmail.com>, bpf <bpf@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
"Dennis Zhou" <dennis@kernel.org>
Subject: Re: Percpu variables, benchmarking, and performance weirdness
Date: Fri, 20 Dec 2019 15:36:51 +0000 (UTC) [thread overview]
Message-ID: <alpine.DEB.2.21.1912201536120.16819@www.lameter.com> (raw)
In-Reply-To: <20191220151239.GE2914998@devbig004.ftw2.facebook.com>
On Fri, 20 Dec 2019, Tejun Heo wrote:
> On Fri, Dec 20, 2019 at 10:34:20AM +0100, Jesper Dangaard Brouer wrote:
> > > So, my question to the uarch/percpu folks out there: Why are percpu
> > > accesses (%gs segment register) more expensive than regular global
> > > variables in this scenario.
> >
> > I'm also VERY interested in knowing the answer to above question!?
> > (Adding LKML to reach more people)
>
> No idea. One difference is that percpu accesses are through vmap area
> which is mapped using 4k pages while global variable would be accessed
> through the fault linear mapping. Maybe you're getting hit by tlb
> pressure?
And there are some accesses from remote processors to per cpu ares of
other cpus. If those are in the same cacheline then those will cause
additional latencies.
next prev parent reply other threads:[~2019-12-20 15:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-20 8:25 Percpu variables, benchmarking, and performance weirdness Björn Töpel
2019-12-20 9:34 ` Jesper Dangaard Brouer
2019-12-20 15:12 ` Tejun Heo
2019-12-20 15:36 ` Christopher Lameter [this message]
2019-12-20 17:10 ` Dennis Zhou
2019-12-20 16:22 ` Eric Dumazet
2019-12-20 16:34 ` Tejun Heo
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=alpine.DEB.2.21.1912201536120.16819@www.lameter.com \
--to=cl@linux.com \
--cc=bjorn.topel@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=brouer@redhat.com \
--cc=dennis@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@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