Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2464363ybt; Tue, 16 Jun 2020 06:52:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKxoZvzZuqqNavYu7spEl1Va1fEf9+oq8lNfsd+n+daDyTsOCBj8Mf289q/f6nAEFySs3s X-Received: by 2002:a17:906:8387:: with SMTP id p7mr2777694ejx.323.1592315565442; Tue, 16 Jun 2020 06:52:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592315565; cv=none; d=google.com; s=arc-20160816; b=uCHqFiXKV7RdOkejbNst0iOyrQGTzqIlsWpFRd0XmqRH01Zeeuzp9lu1L26MVb7MTf 7FPed5cBUqdL575hULzi59mpvZIcUegtDCYy50ji0r3Wuhl2sTXpBRUL8CPxseCMKitY iE2Qdpdsa8M3SvHMqOXg4pV0e5T+CBfw0YIyRTDFAjfUzairIfGHK+eIv/sDL6/z8Nkh rFrXqcjqEPdxgy+KmXKSyTY8FSMWKeEj/w5dGBbFen/INhxe6N44CaEJOqaVyEuN2igy khcCgFdpLr5jRvh0w60UwCLqpymzmmdDMC5Pga6hcAVJ3wwe3z3exsQ0hKVTMXS6cxQ1 CKYQ== 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; bh=zkTlxFOHbT8ip54DHdMqGMNA8VytCu+fWKefkSFNMwU=; b=VCbwG21g5tgnAewklOLNKtkC3pafRWSeFw8mZHy7JL5CIKgCyVOckVlNC9OYHiCi2S BwqR4eciz/lL0PtqJTsYdnGSfU+ljPRHryzJcZa21ujN5gnfghtgYocEAxuA99UQbWrK ST4DIqICY+qTFWumvpB8yl/GYMbNdK0i920nNa7hxakpbP800eyrMto1U/mm3pwaAwU1 wwd/+GKAmjPeLI8lsvZYzeQt0M0sfajqGQcye07N98nv8zf81oJdU+SkalOvdCds+AnV l9smwVvbm+6S2Z/S2LceEjv1Vl1kA4kCITBd3wEp89r3uRvoXsa3Od0MrIikARk+5/eW awLA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y14si10028992edw.263.2020.06.16.06.52.22; Tue, 16 Jun 2020 06:52:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728965AbgFPNuc (ORCPT + 99 others); Tue, 16 Jun 2020 09:50:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:55256 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726306AbgFPNub (ORCPT ); Tue, 16 Jun 2020 09:50:31 -0400 Received: from oasis.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (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 E024620739; Tue, 16 Jun 2020 13:50:29 +0000 (UTC) Date: Tue, 16 Jun 2020 09:50:27 -0400 From: Steven Rostedt To: Lichao Liu Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, bsegall@google.com, mgorman@suse.de, linux-kernel@vger.kernel.org Subject: Re: [PATCH] sched/rt: Don't active rt throtting when no running cfs task Message-ID: <20200616095027.1a2048d0@oasis.local.home> In-Reply-To: <20200616123729.153430-1-liulichao@loongson.cn> References: <20200616123729.153430-1-liulichao@loongson.cn> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 16 Jun 2020 20:37:29 +0800 Lichao Liu wrote: > Active rt throtting will dequeue rt_rq from rq at least 50ms, > When there is no running cfs task, do we still active it? > This is something I would like to have. Peter, what's your thought on this? -- Steve > Signed-off-by: Lichao Liu > --- > kernel/sched/rt.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c > index df11d88c9895..d6524347cea0 100644 > --- a/kernel/sched/rt.c > +++ b/kernel/sched/rt.c > @@ -961,12 +961,13 @@ static int sched_rt_runtime_exceeded(struct rt_rq *rt_rq) > > if (rt_rq->rt_time > runtime) { > struct rt_bandwidth *rt_b = sched_rt_bandwidth(rt_rq); > + struct rq *rq = rq_of_rt_rq(rt_rq); > > /* > * Don't actually throttle groups that have no runtime assigned > * but accrue some time due to boosting. > */ > - if (likely(rt_b->rt_runtime)) { > + if (likely(rt_b->rt_runtime) && rq->cfs.nr_running > 0) { > rt_rq->rt_throttled = 1; > printk_deferred_once("sched: RT throttling activated\n"); > } else {