Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964954AbdCWWhC (ORCPT ); Thu, 23 Mar 2017 18:37:02 -0400 Received: from LGEAMRELO13.lge.com ([156.147.23.53]:40060 "EHLO lgeamrelo13.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933401AbdCWWhB (ORCPT ); Thu, 23 Mar 2017 18:37:01 -0400 X-Original-SENDERIP: 156.147.1.126 X-Original-MAILFROM: byungchul.park@lge.com X-Original-SENDERIP: 165.244.249.25 X-Original-MAILFROM: byungchul.park@lge.com X-Original-SENDERIP: 10.177.222.33 X-Original-MAILFROM: byungchul.park@lge.com Date: Fri, 24 Mar 2017 07:36:23 +0900 From: Byungchul Park To: , CC: , , , Subject: Re: [PATCH 8/8] sched/deadline: Return the best satisfying affinity and dl in cpudl_find Message-ID: <20170323223623.GS11100@X58A-UD3R> References: <1490265163-29981-1-git-send-email-byungchul.park@lge.com> <1490265163-29981-9-git-send-email-byungchul.park@lge.com> MIME-Version: 1.0 In-Reply-To: <1490265163-29981-9-git-send-email-byungchul.park@lge.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-MIMETrack: Itemize by SMTP Server on LGEKRMHUB04/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/03/24 07:36:58, Serialize by Router on LGEKRMHUB04/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/03/24 07:36:58, Serialize complete at 2017/03/24 07:36:58 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1144 Lines: 25 On Thu, Mar 23, 2017 at 07:32:43PM +0900, 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). ^ should be 1 > > where cpu 3 want to push a task (affinity is 1 2 3 and dl is 1). ^ should be 2 > > 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 tries to find the best among ones satisfying task's affinity > and dl constraint until success or no more to see.