Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753261AbcD1NaX (ORCPT ); Thu, 28 Apr 2016 09:30:23 -0400 Received: from mail-wm0-f49.google.com ([74.125.82.49]:36001 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752731AbcD1NaR (ORCPT ); Thu, 28 Apr 2016 09:30:17 -0400 Date: Thu, 28 Apr 2016 15:30:10 +0200 From: Frederic Weisbecker To: cl@linux.com, alexander.shishkin@linux.intel.com, mingo@kernel.org, tglx@linutronix.de, viresh.kumar@linaro.org, cmetcalf@mellanox.com, linux-kernel@vger.kernel.org, eranian@google.com, hpa@zytor.com, riel@redhat.com, jolsa@redhat.com, vincent.weaver@maine.edu, kernellwp@gmail.com, lcapitulino@redhat.com, peterz@infradead.org, acme@redhat.com, efault@gmx.de Cc: linux-tip-commits@vger.kernel.org Subject: Re: [tip:sched/urgent] nohz/full, sched/rt: Fix missed tick-reenabling bug in sched_can_stop_tick() Message-ID: <20160428133007.GB14497@lerouge> References: <20160421160315.GK24771@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1532 Lines: 34 On Thu, Apr 28, 2016 at 03:24:43AM -0700, tip-bot for Peter Zijlstra wrote: > Commit-ID: 2548d546d40c0014efdde88a53bf7896e917dcce > Gitweb: http://git.kernel.org/tip/2548d546d40c0014efdde88a53bf7896e917dcce > Author: Peter Zijlstra > AuthorDate: Thu, 21 Apr 2016 18:03:15 +0200 > Committer: Ingo Molnar > CommitDate: Thu, 28 Apr 2016 10:28:55 +0200 > > nohz/full, sched/rt: Fix missed tick-reenabling bug in sched_can_stop_tick() > > Chris Metcalf reported a that sched_can_stop_tick() sometimes fails to > re-enable the tick. > > His observed problem is that rq->cfs.nr_running can be 1 even though > there are multiple runnable CFS tasks. This happens in the cgroup > case, in which case cfs.nr_running is the number of runnable entities > for that level. > > If there is a single runnable cgroup (which can have an arbitrary > number of runnable child entries itself) rq->cfs.nr_running will be 1. > > However, looking at that function I think there's more problems with it. > > It seems to assume that if there's FIFO tasks, those will run. This is > incorrect. The FIFO task can have a lower prio than an RR task, in which > case the RR task will run. > > So the whole fifo_nr_running test seems misplaced, it should go after > the rr_nr_running tests. That is, only if !rr_nr_running, can we use > fifo_nr_running like this. Thanks for this patch. I indeed made confusions around SCHED_RR and SCHED_FIFO priorities. Too late for me to ACK but I would have. Thanks!