Re: [PATCH 8/9] psi: pressure stall information for CPU, memory, and IO
From: Peter Zijlstra
Date: Fri Sep 07 2018 - 10:59:20 EST
On Fri, Sep 07, 2018 at 10:44:22AM -0400, Johannes Weiner wrote:
> > This does the whole seqcount thing 6x, which is a bit of a waste.
>
> [...]
>
> > It's a bit cumbersome, but that's because of C.
>
> I was actually debating exactly this with Suren before, but since this
> is a super cold path I went with readability. I was also thinking that
> restarts could happen quite regularly under heavy scheduler load, and
> so keeping the individual retry sections small could be helpful - but
> I didn't instrument this in any way.
I was hoping going over the whole thing once would reduce the time we
need to keep that line in shared mode and reduce traffic. And yes, this
path is cold, but I was thinking about reducing the interference on the
remote CPU.
Alternatively, we memcpy the whole line under the seqlock and then do
everything later.
Also, this only has a single cpu_clock() invocation.