From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org, Davidlohr Bueso <dbueso@suse.de>
Subject: Re: [PATCH 1/2] perf bench futex: cache align the worer struct
Date: Wed, 19 Oct 2016 15:07:23 +0200 [thread overview]
Message-ID: <20161019130722.t7viruflpg2xu5sx@linutronix.de> (raw)
In-Reply-To: <20161018010949.GD29373@linux-80c1.suse>
On 2016-10-17 18:09:49 [-0700], Davidlohr Bueso wrote:
> On Sun, 16 Oct 2016, Sebastian Andrzej Siewior wrote:
>
> > It popped up in perf testing that the worker consumes some amount of
> > CPU. It boils down to the increment of `ops` which causes cache line
> > bouncing between the individual threads.
>
> Are you referring to this?
>
> â for (i = 0; i < nfutexes; i++, w->ops++) {
> â be: add $0x1,%ebx
> 65.87 â addq $0x1,0x18(%r12)
>
> (which is like 65% of 13% on my box with a default futex-hash run).
correct.
> Even better, could we get rid entirely of the ops increments and just
> use a local variable, then update the worker at the end of the function.
> The following makes 'perf' pretty much disappear in the profile.
this should do it, too. So what remains is the read access for w->futex
but since it does not pop up in perf, it is probably not that important.
> Thanks,
> Davidlohr
Sebastian
next prev parent reply other threads:[~2016-10-19 14:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-16 19:08 Sebastian Andrzej Siewior
2016-10-16 19:08 ` [PATCH 2/2] perf bench futex: add NUMA support Sebastian Andrzej Siewior
2016-10-17 14:38 ` Arnaldo Carvalho de Melo
2016-10-17 15:01 ` Jiri Olsa
2016-10-17 15:04 ` Arnaldo Carvalho de Melo
2016-10-17 15:33 ` [PATCH 2/2 v2] " Sebastian Andrzej Siewior
2016-10-19 18:16 ` Davidlohr Bueso
2016-10-19 18:37 ` Sebastian Andrzej Siewior
2016-10-21 2:34 ` Davidlohr Bueso
2016-10-21 3:03 ` Davidlohr Bueso
2016-10-18 1:09 ` [PATCH 1/2] perf bench futex: cache align the worer struct Davidlohr Bueso
2016-10-19 13:07 ` Sebastian Andrzej Siewior [this message]
2016-10-19 17:59 ` [PATCH] perf/bench-futex: Avoid worker cacheline bouncing Davidlohr Bueso
2016-10-19 18:13 ` Sebastian Andrzej Siewior
2016-10-19 18:41 ` Davidlohr Bueso
2016-10-24 19:06 ` [tip:perf/core] perf bench futex: Cache align the worker struct tip-bot for Sebastian Andrzej Siewior
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=20161019130722.t7viruflpg2xu5sx@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=acme@kernel.org \
--cc=dave@stgolabs.net \
--cc=dbueso@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@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 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®