[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200116095507.6f164a0a@gandalf.local.home>
Date: Thu, 16 Jan 2020 09:55:07 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Alexander Popov <alex.popov@...ux.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
John Stultz <john.stultz@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>,
Stephen Boyd <sboyd@...nel.org>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
linux-kernel@...r.kernel.org, notify@...nel.org
Subject: Re: [PATCH 1/1] timer: Warn about schedule_timeout() called for
tasks in TASK_RUNNING state
On Thu, 16 Jan 2020 09:52:20 -0500
Steven Rostedt <rostedt@...dmis.org> wrote:
> > --- a/kernel/time/timer.c
> > +++ b/kernel/time/timer.c
> > @@ -1887,6 +1887,11 @@ signed long __sched schedule_timeout(signed long timeout)
> > }
> > }
> >
> > +#ifdef CONFIG_SCHED_DEBUG
> > + WARN_ONCE(current->state == TASK_RUNNING,
> > + "schedule_timeout for TASK_RUNNING\n");
> > +#endif
> > +
>
> But this can trigger false warnings. For example, if we are waiting on
> an event with a timeout:
Also, there are helpers here that you can use:
schedule_timeout_interruptible(signed long timeout);
schedule_timeout_uninterruptible(signed long timeout)
-- Steve
Powered by blists - more mailing lists