Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1488632
| From | Jan Kara <jack@suse.cz> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 7/7] sched/core: Add debug code to catch missing update_rq_clock() |
| Date | 2016-09-22 10:40 +0200 |
| Message-ID | <sk7HX-3Yu-1@gated-at.bofh.it> (permalink) |
| References | <sjPUJ-17j-7@gated-at.bofh.it> <sjPUK-17j-21@gated-at.bofh.it> <sjS6e-2q3-21@gated-at.bofh.it> <sk7eV-3OW-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu 22-09-16 10:04:36, Peter Zijlstra wrote:
> On Wed, Sep 21, 2016 at 05:58:27PM +0200, Petr Mladek wrote:
> > > +static inline void assert_clock_updated(struct rq *rq)
> > > +{
> > > +#ifdef CONFIG_SCHED_DEBUG
> > > + /*
> > > + * The only reason for not seeing a clock update since the
> > > + * last rq_pin_lock() is if we're currently skipping updates.
> > > + */
> > > + WARN_ON_ONCE(rq->clock_update_flags < RQCF_ACT_SKIP);
> > > +#endif
> > > +}
> >
> > I am afraid that it might eventually create a deadlock.
> > For example, there is the following call chain:
> >
>
> Yeah, meh. There's already plenty WARNs in the sched code. The idea of
> course being that they should not trigger. If they do, something
> buggered already, so who bloody cares about a deadlock later ;-)
Yeah, the trouble is that you usually won't see the WARN message
before deadlocking. So WARN_ON in scheduler is usually equivalent to
if (condition)
while (1);
;) Not really helping debugging much...
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/7] sched: Diagnostic checks for missing rq clock updates Matt Fleming <matt@codeblueprint.co.uk> - 2016-09-21 15:40 +0200
[PATCH v2 5/7] sched/core: Reset RQCF_ACT_SKIP before unpinning rq->lock Matt Fleming <matt@codeblueprint.co.uk> - 2016-09-21 15:40 +0200
[PATCH v2 3/7] sched/fair: Update rq clock in task_hot() Matt Fleming <matt@codeblueprint.co.uk> - 2016-09-21 15:40 +0200
[PATCH v2 2/7] sched/fair: Update rq clock before waking up new task Matt Fleming <matt@codeblueprint.co.uk> - 2016-09-21 15:40 +0200
[PATCH v2 7/7] sched/core: Add debug code to catch missing update_rq_clock() Matt Fleming <matt@codeblueprint.co.uk> - 2016-09-21 15:40 +0200
Re: [PATCH v2 7/7] sched/core: Add debug code to catch missing update_rq_clock() Petr Mladek <pmladek@suse.com> - 2016-09-21 18:00 +0200
Re: [PATCH v2 7/7] sched/core: Add debug code to catch missing update_rq_clock() Matt Fleming <matt@codeblueprint.co.uk> - 2016-09-21 21:10 +0200
Re: [PATCH v2 7/7] sched/core: Add debug code to catch missing update_rq_clock() Thomas Gleixner <tglx@linutronix.de> - 2016-09-21 21:50 +0200
Re: [PATCH v2 7/7] sched/core: Add debug code to catch missing update_rq_clock() Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-09-22 02:50 +0200
Re: [PATCH v2 7/7] sched/core: Add debug code to catch missing update_rq_clock() Peter Zijlstra <peterz@infradead.org> - 2016-09-22 10:10 +0200
Re: [PATCH v2 7/7] sched/core: Add debug code to catch missing update_rq_clock() Jan Kara <jack@suse.cz> - 2016-09-22 10:40 +0200
Re: [PATCH v2 7/7] sched/core: Add debug code to catch missing update_rq_clock() Peter Zijlstra <peterz@infradead.org> - 2016-09-22 11:40 +0200
Re: [PATCH v2 7/7] sched/core: Add debug code to catch missing update_rq_clock() Peter Zijlstra <peterz@infradead.org> - 2016-09-22 13:30 +0200
[PATCH v2 4/7] sched: Add wrappers for lockdep_(un)pin_lock() Matt Fleming <matt@codeblueprint.co.uk> - 2016-09-21 15:40 +0200
[PATCH v2 6/7] sched/fair: Push rq lock pin/unpin into idle_balance() Matt Fleming <matt@codeblueprint.co.uk> - 2016-09-21 15:40 +0200
[PATCH v2 1/7] sched/fair: Update the rq clock before detaching tasks Matt Fleming <matt@codeblueprint.co.uk> - 2016-09-21 15:50 +0200
csiph-web