Path: csiph.com!aioe.org!bofh.it!news.nic.it!robomod From: Juri Lelli Newsgroups: linux.kernel Subject: Re: [PATCH 0/8] sched/deadline: Return the best satisfying affinity and dl in cpudl_find Date: Mon, 27 Mar 2017 16:10:01 +0200 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: robomod@news.nic.it List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Approved: robomod@news.nic.it Lines: 36 Organization: linux.* mail to news gateway X-Original-Cc: peterz@infradead.org, mingo@kernel.org, linux-kernel@vger.kernel.org, juri.lelli@gmail.com, rostedt@goodmis.org, kernel-team@lge.com X-Original-Date: Mon, 27 Mar 2017 15:05:07 +0100 X-Original-Message-ID: <20170327140507.GN10289@e106622-lin> X-Original-References: <1490265163-29981-1-git-send-email-byungchul.park@lge.com> X-Original-Sender: linux-kernel-owner@vger.kernel.org Xref: csiph.com linux.kernel:1609863 Hi, On 23/03/17 19:32, Byungchul Park wrote: > cpudl_find() is used to find a cpu having the latest dl. The function > should return the latest cpu among ones satisfying task's affinity and > dl constraint, but current code gives up immediately and just return > fail when it fails at the test *only with* the maximum cpu. > > For example: > > cpu 0 is running a task (dl: 10). > cpu 1 is running a task (dl: 9). > cpu 2 is running a task (dl: 8). > cpu 3 is running a task (dl: 2). > > where cpu 3 want to push a task (affinity is 1 2 3 and dl is 1). Hummm, but this should only happen if you disable admission control, right? Otherwise task's affinity can't be smaller that 0-3. > > In this case, the task should be migrated from cpu 3 to cpu 1, and > preempt cpu 1's task. However, current code just returns fail because > it fails at the affinity test with the maximum cpu, that is, cpu 0. > > This patch set tries to find the best among ones satisfying task's > affinity and dl constraint until success or no more to see. > Anyway, do you have numbers showing how common is you fail scenario? It would be interesting to understand how much the slow path is actually used, IMHO. Thanks, - Juri