From: Peter Zijlstra <peterz@infradead.org>
To: "Fredrik Markström" <fredrik.markstrom@gmail.com>
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org,
"Rik van Riel" <riel@redhat.com>, "Jason Low" <jason.low2@hp.com>,
"Frédéric Weisbecker" <fweisbec@gmail.com>
Subject: Re: [PATCH 1/1] cputime: Make the reported utime+stime correspond to the actual runtime.
Date: Tue, 30 Jun 2015 14:18:12 +0200 [thread overview]
Message-ID: <20150630121812.GG3644@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <CAKdL+dR68T7LMZ_ndwihvMo_SaUB1G++JaZ28RXiqaHs9gpP0g@mail.gmail.com>
On Tue, Jun 30, 2015 at 01:50:15PM +0200, Fredrik Markström wrote:
> Excellent,
Please do not top post.
> The reason I replaced the early bail with that last test is that I
> believe it needs to be done within the lock and I wanted to keep that
> region short. To be honest I'm not sure this test is needed at all
> anymore, but I couldn't make sense of the comment above the early bail
> so I didn't dare to remove it.
Ah, there's a simple reason we should keep it, apart from the wobblies
in calculating the division. Imagine two concurrent callers, on with an
rtime ahead of the other. Let the latest rtime caller acquire the lock
first and compute s/u-time. Once the second caller acquires the lock, we
observe the last rtime was in the past and we use the latest values.
> Regarding the lock, have you considered how many cores you need
> hammering at rusage to introduce some substantial congestion ?
Spinlock contention across 120 cores and 4 nodes is pretty bad, even
with hardly any hold time :-)
I've not investigated where the absolute pain threshold is, but given the
size (and growth) of machines these days, its seems like a prudent
thing.
> Sorry for not letting this go (I know I should) but I always feel bad
> introducing per thread data.
Yes agreed, but a global lock is just asking for trouble. Esp when its
as easy as this to avoid it.
next prev parent reply other threads:[~2015-06-30 12:18 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-12 8:55 [PATCH 0/1] cputime: Make the reported utime+stime correspond to the actual runtime Fredrik Markstrom
2015-06-12 8:55 ` [PATCH 1/1] " Fredrik Markstrom
2015-06-12 10:16 ` Peter Zijlstra
2015-06-12 11:01 ` Peter Zijlstra
2015-06-15 15:34 ` Fredrik Markström
2015-06-16 14:35 ` Fredrik Markström
2015-06-29 14:58 ` Peter Zijlstra
2015-06-29 15:28 ` Fredrik Markström
2015-06-29 18:54 ` Jason Low
2015-06-29 19:08 ` Fredrik Markström
2015-06-29 22:11 ` Jason Low
2015-06-30 9:30 ` Peter Zijlstra
2015-06-30 11:50 ` Fredrik Markström
2015-06-30 12:18 ` Peter Zijlstra [this message]
2015-06-30 18:30 ` Fredrik Markström
2015-07-02 12:11 ` Peter Zijlstra
2015-07-02 13:07 ` Peter Zijlstra
2015-07-07 0:51 ` Frederic Weisbecker
2015-07-07 7:59 ` Peter Zijlstra
2015-07-07 8:09 ` Peter Zijlstra
2015-07-07 12:10 ` Fredrik Markström
2015-07-07 15:37 ` Peter Zijlstra
2015-07-07 13:34 ` Frederic Weisbecker
2015-07-07 15:34 ` Peter Zijlstra
2015-07-07 16:26 ` Frederic Weisbecker
2015-06-13 11:17 ` Fredrik Markström
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=20150630121812.GG3644@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=fredrik.markstrom@gmail.com \
--cc=fweisbec@gmail.com \
--cc=jason.low2@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=riel@redhat.com \
/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