Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp70023imm; Thu, 14 Jun 2018 15:33:18 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJCNQLxnGCLkVvnR0SBYs0LSObiKYEIi7Z9vRgWbJcVF4NjS5OzLg4u+RL2sGd1YZAJDDyr X-Received: by 2002:a17:902:4545:: with SMTP id m63-v6mr5113755pld.268.1529015598907; Thu, 14 Jun 2018 15:33:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529015598; cv=none; d=google.com; s=arc-20160816; b=mVF0IClBXvOcVRGvSFZ9auH2nx86Tw53qWz11pAJ9+9SCPvm9Wu+fBVbBItixP/ruz m1/3b+Xe4Aun0hVjbdWi2sE/5zFX1Znc5P/B3PHAOo3znAEKuWDYOd7yeOGiKGYH1VQG oOb0khFsp6aBAz4uny8Lh7RG97SIWSxJ9YyE14yneQ9J4lp4ihqXur0A4xPf4pQQ/1xP Wdh+/T9WClOVo7gPvs3O0rUNEjwXgAffZE13upipyo+FfvMmUS4cGynD/zPk8hAeh0dP AzUTZRQc3b7xVg2xTL47u+gDWHEr8szKYsBqKEQsidaezNqPMYDFU3juA+AZnGOAVwDC iyNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=6k0kkacrvYjoCmgvoKR5pBb/t7hUVIvbYQ5rAyEtnVE=; b=vawxkclbvGwm/kPcpawP6IvYkYE/pqRR464HiVKTNvpIb1tl9N/gMgTGT1NgW3nRqr uMSwPX82K0YxoHPjZETPrBr69fqOokv+sCv4XcyxaciCh0BRVxniLLQZtfj24klqpnMG vwLVypvEKjMzX+yyHcvAhv6XPI1TrkFPx6llnlptLg8lS7vK65oizYiWuWwvgEMF2+4m N+b3UGFHiN/U+jwEJ8AcJfDlI9nxBJmtmDeiWknzRFp0AV792guHRCJ+qpHCqUjMGiXi pE9WpyA9Y+uLG53hl5XJmUW5Fom7S0vgOjT2VbToTplq7KOLk3gHxsc3XVDMl6JmkCRn v41A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r7-v6si5081839pgq.675.2018.06.14.15.33.04; Thu, 14 Jun 2018 15:33:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965049AbeFNWcP convert rfc822-to-8bit (ORCPT + 99 others); Thu, 14 Jun 2018 18:32:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:59320 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964907AbeFNWcO (ORCPT ); Thu, 14 Jun 2018 18:32:14 -0400 Received: from gandalf.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CEA4B208BA; Thu, 14 Jun 2018 22:32:12 +0000 (UTC) Date: Thu, 14 Jun 2018 18:32:11 -0400 From: Steven Rostedt To: Ben Hutchings Cc: Davidlohr Bueso , Matt Fleming , "Peter Zijlstra (Intel)" , stable@vger.kernel.org, Linus Torvalds , Mike Galbraith , Thomas Gleixner , dave@stgolabs.net, Ingo Molnar , Sasha Levin , Greg Kroah-Hartman , LKML Subject: Re: [PATCH 4.4 173/268] sched/rt: Fix rq->clock_update_flags < RQCF_ACT_SKIP warning Message-ID: <20180614183211.0beacf67@gandalf.local.home> In-Reply-To: <1529013356.2289.200.camel@codethink.co.uk> References: <20180528100202.045206534@linuxfoundation.org> <20180528100221.993481294@linuxfoundation.org> <1529013356.2289.200.camel@codethink.co.uk> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 14 Jun 2018 22:55:56 +0100 Ben Hutchings wrote: > On Mon, 2018-05-28 at 12:02 +0200, Greg Kroah-Hartman wrote: > > 4.4-stable review patch.  If anyone has any objections, please let me know. > > > > ------------------ > > > > From: Davidlohr Bueso > > > > [ Upstream commit d29a20645d5e929aa7e8616f28e5d8e1c49263ec ] > > > > While running rt-tests' pi_stress program I got the following splat: > > > >   rq->clock_update_flags < RQCF_ACT_SKIP > >   WARNING: CPU: 27 PID: 0 at kernel/sched/sched.h:960 assert_clock_updated.isra.38.part.39+0x13/0x20 > > > >   [...] > > > >   > >   enqueue_top_rt_rq+0xf4/0x150 > >   ? cpufreq_dbs_governor_start+0x170/0x170 > >   sched_rt_rq_enqueue+0x65/0x80 > >   sched_rt_period_timer+0x156/0x360 > >   ? sched_rt_rq_enqueue+0x80/0x80 > >   __hrtimer_run_queues+0xfa/0x260 > >   hrtimer_interrupt+0xcb/0x220 > >   smp_apic_timer_interrupt+0x62/0x120 > >   apic_timer_interrupt+0xf/0x20 > >   > > > >   [...] > > > >   do_idle+0x183/0x1e0 > >   cpu_startup_entry+0x5f/0x70 > >   start_secondary+0x192/0x1d0 > >   secondary_startup_64+0xa5/0xb0 > > > > We can get rid of it be the "traditional" means of adding an > > update_rq_clock() call after acquiring the rq->lock in > > do_sched_rt_period_timer(). > > > > The case for the RT task throttling (which this workload also hits) > > can be ignored in that the skip_update call is actually bogus and > > quite the contrary (the request bits are removed/reverted). > > > > By setting RQCF_UPDATED we really don't care if the skip is happening > > or not and will therefore make the assert_clock_updated() check happy. > > There is no such flag or assertion in 4.4 or 4.9, so does this change > still make sense there? I believe the assert was added to catch bugs like this. Although the change log is a bit ambiguous in if it is fixing an actual miss update, or if it is just quieting a false positive. Davidlohr? -- Steve > > Ben. > > > Signed-off-by: Davidlohr Bueso > > Reviewed-by: Matt Fleming > > Acked-by: Peter Zijlstra (Intel) > > Cc: Linus Torvalds > > Cc: Mike Galbraith > > Cc: Thomas Gleixner > > Cc: dave@stgolabs.net > > Cc: linux-kernel@vger.kernel.org > > Cc: rostedt@goodmis.org > > Link: http://lkml.kernel.org/r/20180402164954.16255-1-dave@stgolabs.net > > Signed-off-by: Ingo Molnar > > Signed-off-by: Sasha Levin > > Signed-off-by: Greg Kroah-Hartman > > --- > >  kernel/sched/rt.c |    2 ++ > >  1 file changed, 2 insertions(+) > > > > --- a/kernel/sched/rt.c > > +++ b/kernel/sched/rt.c > > @@ -822,6 +822,8 @@ static int do_sched_rt_period_timer(stru > >   struct rq *rq = rq_of_rt_rq(rt_rq); > >   > >   raw_spin_lock(&rq->lock); > > + update_rq_clock(rq); > > + > >   if (rt_rq->rt_time) { > >   u64 runtime; > >   > > > > > >