[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180724160126.GC11598@cmpxchg.org>
Date: Tue, 24 Jul 2018 12:01:26 -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 Thu, Jul 19, 2018 at 10:31:15PM +0200, Peter Zijlstra wrote:
> On Thu, Jul 19, 2018 at 02:47:40PM -0400, Johannes Weiner wrote:
> > 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:
> > > > + /* Update task counts according to the set/clear bitmasks */
> > > > + for (to = 0; (bo = ffs(clear)); to += bo, clear >>= bo) {
> > > > + int idx = to + (bo - 1);
> > > > +
> > > > + if (tasks[idx] == 0 && !psi_bug) {
> > > > + printk_deferred(KERN_ERR "psi: task underflow! cpu=%d idx=%d tasks=[%u %u %u] clear=%x set=%x\n",
> > > > + cpu, idx, tasks[0], tasks[1], tasks[2],
> > > > + clear, set);
> > > > + psi_bug = 1;
> > > > + }
> > >
> > > WARN_ONCE(!tasks[idx], ...);
> >
> > It's just open-coded because of the printk_deferred, since this is
> > inside the scheduler.
>
> Yeah, meh. There's ton of WARNs in the scheduler, WARNs should not
> trigger anyway.
This one in particular gave us quite a runaround. We had a subtle bug
in how psi processed task CPU migration that would only manifest with
hundreds of thousands of machine hours. When it triggered, instead of
the warning, we'd crash on a corrupted stack with a completely useless
crash dump - PC pointing to things that couldn't possibly trap etc.
So printk_deferred has been a lot more useful in those rare but
desparate cases ;-) Plus we keep the machine alive.
Powered by blists - more mailing lists