From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756607AbdCUHxW (ORCPT ); Tue, 21 Mar 2017 03:53:22 -0400 Received: from LGEAMRELO12.lge.com ([156.147.23.52]:55504 "EHLO lgeamrelo12.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753669AbdCUHwk (ORCPT ); Tue, 21 Mar 2017 03:52:40 -0400 X-Original-SENDERIP: 156.147.1.121 X-Original-MAILFROM: byungchul.park@lge.com X-Original-SENDERIP: 165.244.249.23 X-Original-MAILFROM: byungchul.park@lge.com X-Original-SENDERIP: 10.177.222.33 X-Original-MAILFROM: byungchul.park@lge.com Date: Tue, 21 Mar 2017 16:52:04 +0900 From: Byungchul Park To: , CC: , , , Subject: Re: [PATCH] sched/deadline: Make find_later_rq() choose a closer cpu in topology Message-ID: <20170321075204.GM11100@X58A-UD3R> References: <1490060300-17593-1-git-send-email-byungchul.park@lge.com> <20170321062957.GL11100@X58A-UD3R> MIME-Version: 1.0 In-Reply-To: <20170321062957.GL11100@X58A-UD3R> User-Agent: Mutt/1.5.21 (2010-09-15) X-MIMETrack: Itemize by SMTP Server on LGEKRMHUB08/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/03/21 16:52:36, Serialize by Router on LGEKRMHUB08/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/03/21 16:52:36, Serialize complete at 2017/03/21 16:52:36 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 On Tue, Mar 21, 2017 at 03:29:57PM +0900, Byungchul Park wrote: > On Tue, Mar 21, 2017 at 10:38:20AM +0900, Byungchul Park wrote: > > When cpudl_find() returns any among free_cpus, the cpu might not be > > closer than others, considering sched domain. For example: > > > > this_cpu: 15 > > free_cpus: 0, 1,..., 14 (== later_mask) > > best_cpu: 0 > > > > topology: > > > > 0 --+ > > +--+ > > 1 --+ | > > +-- ... --+ > > 2 --+ | | > > +--+ | > > 3 --+ | > > > > ... ... > > > > 12 --+ | > > +--+ | > > 13 --+ | | > > +-- ... -+ > > 14 --+ | > > +--+ > > 15 --+ > > > > In this case, it would be best to select 14 since it's a free cpu and > > closest to 15(this_cpu). However, currently the code select 0(best_cpu) > > even though that's just any among free_cpus. Fix it. > > Hello, > > I think it would be better to split this into two patches: > > 1. Clean up cpudl_find() at cpudeadline.c. > 2. Make it choose a closer cpu in topology. > > I will do it if you agree with my original purpose. Hello, I tried to take care of the case of later_mask = NULL, which was missed in the 1st spin, but it seems to be not that meaningful. I will give up clean-up patch. I am sorry for making you confused.