Received: by 10.213.65.68 with SMTP id h4csp1707073imn; Thu, 5 Apr 2018 02:19:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx49FVYFVgXdoLChVSK4W3uHMG7Or95L/0Y+0PntBM1V75I8h/c3fvn4p98BRO4tEqo2EkDLk X-Received: by 10.98.238.3 with SMTP id e3mr16443657pfi.88.1522919942434; Thu, 05 Apr 2018 02:19:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522919942; cv=none; d=google.com; s=arc-20160816; b=zXqHEL3u58r78PnSrauzpAU+J4G/dys5lZ2qY6MQdi8OLfJ3dIvPKnraC9taRBiM8N 43P9JUSUW4jKGRlCg6Rr0O/y0MdkBZBjHSXqqRnAdcpO0EEMK4/paoLak7CjmkHssJ7F E4GES+Mnfs+459FksVhd+5cXlNtx77bn9CvL0ftv0z7vJiKdzjzXkXXhLi8bAz9d/9bn fzydThJI8TLWGx6P8faULIx4j841HBDpfSk8JNSbuo4QUBhoQGyoPPC4l9uKoteNub3j C8PsPs/D0/LzOuMGH6CbNsI1fjg6Gq6wvZnIQHAilW5dYWaHeagMyHqwiSEO7M3bR1Zh S+8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=LL8vF8r1ZyTBsQWwVbtibilDxMCXnMhR9m02KTrqCpE=; b=SGpyWasO3CPp0TPv3tzLsUTnuRl8tz+/JhziOJy0y2HZ8JI6mnvs96hDwUOJ8O8FUk qx1Ar4Jk33I26wQBjVjq5moFKbtS6E7y0xtofbKAi0nFssTBhMRV/rzMQDgqmLLyVFfe 851bv52Gi7H/5BD5VV5nwpj2QmKXJYPAqTml0qEduKU6HN/3IDi+gpUghFVTdSBDbXCb +DLDV96E3Ze0PDVY76uVprJa8KhqWxO5GtfUV3decPhzM7NYN+HI9zNHzWGFV03mr/Es 37NDh/9FBktcT9IrwvA3c/qHAcDxP24gPBp6EG9ZRNXt5I4UpoI7QJ+P4KH2KDR+IGEd 1mBQ== 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 v14si5221334pgq.266.2018.04.05.02.18.48; Thu, 05 Apr 2018 02:19:02 -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 S1751613AbeDEJRh (ORCPT + 99 others); Thu, 5 Apr 2018 05:17:37 -0400 Received: from terminus.zytor.com ([198.137.202.136]:41719 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751363AbeDEJRf (ORCPT ); Thu, 5 Apr 2018 05:17:35 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTP id w359Gxlq117886; Thu, 5 Apr 2018 02:16:59 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w359Gwja117883; Thu, 5 Apr 2018 02:16:58 -0700 Date: Thu, 5 Apr 2018 02:16:58 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Davidlohr Bueso Message-ID: Cc: matt@codeblueprint.co.uk, dbueso@suse.de, mingo@kernel.org, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, peterz@infradead.org, efault@gmx.de, dave@stgolabs.net, tglx@linutronix.de, hpa@zytor.com Reply-To: efault@gmx.de, dave@stgolabs.net, hpa@zytor.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, mingo@kernel.org, dbueso@suse.de, matt@codeblueprint.co.uk, peterz@infradead.org, torvalds@linux-foundation.org In-Reply-To: <20180402164954.16255-1-dave@stgolabs.net> References: <20180402164954.16255-1-dave@stgolabs.net> To: linux-tip-commits@vger.kernel.org Subject: [tip:sched/urgent] sched/rt: Fix rq->clock_update_flags < RQCF_ACT_SKIP warning Git-Commit-ID: d29a20645d5e929aa7e8616f28e5d8e1c49263ec X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,BAYES_00, FREEMAIL_FORGED_REPLYTO autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: d29a20645d5e929aa7e8616f28e5d8e1c49263ec Gitweb: https://git.kernel.org/tip/d29a20645d5e929aa7e8616f28e5d8e1c49263ec Author: Davidlohr Bueso AuthorDate: Mon, 2 Apr 2018 09:49:54 -0700 Committer: Ingo Molnar CommitDate: Thu, 5 Apr 2018 09:20:46 +0200 sched/rt: Fix rq->clock_update_flags < RQCF_ACT_SKIP warning 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. 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 --- kernel/sched/rt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index 86b77987435e..ad13e6242481 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c @@ -839,6 +839,8 @@ static int do_sched_rt_period_timer(struct rt_bandwidth *rt_b, int overrun) continue; raw_spin_lock(&rq->lock); + update_rq_clock(rq); + if (rt_rq->rt_time) { u64 runtime;