lkml.org 
[lkml]   [2018]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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:
> > + /* 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.

It actually used to be a straight-up WARN_ONCE() in older
versions. Recursive scheduling bugs are no fun to debug ;)

\
 
 \ /
  Last update: 2018-07-19 20:45    [W:0.123 / U:3.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site