[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180718223644.GH2838@cmpxchg.org>
Date: Wed, 18 Jul 2018 18:36:44 -0400
From: Johannes Weiner <hannes@...xchg.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Tejun Heo <tj@...nel.org>,
Suren Baghdasaryan <surenb@...gle.com>,
Vinayak Menon <vinmenon@...eaurora.org>,
Christopher Lameter <cl@...ux.com>,
Mike Galbraith <efault@....de>,
Shakeel Butt <shakeelb@...gle.com>, linux-mm@...ck.org,
cgroups@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-team@...com
Subject: Re: [PATCH 08/10] psi: pressure stall information for CPU, memory,
and IO
On Wed, Jul 18, 2018 at 02:03:18PM +0200, Peter Zijlstra wrote:
> On Thu, Jul 12, 2018 at 01:29:40PM -0400, Johannes Weiner wrote:
> > + /* Time in which tasks wait for the CPU */
> > + state = PSI_NONE;
> > + if (tasks[NR_RUNNING] > 1)
> > + state = PSI_SOME;
> > + time_state(&groupc->res[PSI_CPU], state, now);
> > +
> > + /* Time in which tasks wait for memory */
> > + state = PSI_NONE;
> > + if (tasks[NR_MEMSTALL]) {
> > + if (!tasks[NR_RUNNING] ||
> > + (cpu_curr(cpu)->flags & PF_MEMSTALL))
>
> I'm confused, why do we care if the current tasks is MEMSTALL or not?
We want to know whether we're losing CPU potential because of a lack
of memory. That can happen when the task waits for refaults and the
CPU goes idle, but it can also happen when the CPU is performing
reclaim.
If the task waits for refaults and something else is runnable, we're
not losing CPU potential. But if the task performs reclaim and uses
the CPU, nothing else can do productive work on that CPU.
Powered by blists - more mailing lists