From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753022AbcIVIFD (ORCPT ); Thu, 22 Sep 2016 04:05:03 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:52589 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751455AbcIVIFC (ORCPT ); Thu, 22 Sep 2016 04:05:02 -0400 Date: Thu, 22 Sep 2016 10:04:36 +0200 From: Peter Zijlstra To: Petr Mladek Cc: Matt Fleming , Ingo Molnar , Byungchul Park , Frederic Weisbecker , Luca Abeni , Rik van Riel , Thomas Gleixner , Wanpeng Li , Yuyang Du , Jan Kara , Sergey Senozhatsky , linux-kernel@vger.kernel.org, Mel Gorman , Mike Galbraith Subject: Re: [PATCH v2 7/7] sched/core: Add debug code to catch missing update_rq_clock() Message-ID: <20160922080436.GX5008@twins.programming.kicks-ass.net> References: <20160921133813.31976-1-matt@codeblueprint.co.uk> <20160921133813.31976-8-matt@codeblueprint.co.uk> <20160921155826.GB8408@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160921155826.GB8408@pathway.suse.cz> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ;-)