From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758713AbdCVCsc (ORCPT ); Tue, 21 Mar 2017 22:48:32 -0400 Received: from LGEAMRELO12.lge.com ([156.147.23.52]:37027 "EHLO lgeamrelo12.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757696AbdCVCsb (ORCPT ); Tue, 21 Mar 2017 22:48:31 -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: Wed, 22 Mar 2017 11:46:20 +0900 From: Byungchul Park To: Daniel Bristot de Oliveira CC: , , , , , Subject: Re: [PATCH v2] sched/deadline: Make find_later_rq() choose a closer cpu in topology Message-ID: <20170322024620.GN11100@X58A-UD3R> References: <1490082744-13461-1-git-send-email-byungchul.park@lge.com> <7528b635-4a18-f449-ec70-f040a471c4f1@redhat.com> MIME-Version: 1.0 In-Reply-To: <7528b635-4a18-f449-ec70-f040a471c4f1@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-MIMETrack: Itemize by SMTP Server on LGEKRMHUB07/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/03/22 11:46:54, Serialize by Router on LGEKRMHUB07/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/03/22 11:46:54, Serialize complete at 2017/03/22 11:46:54 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 02:28:50PM +0100, Daniel Bristot de Oliveira wrote: > On 03/21/2017 08:52 AM, 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. > > That is a nice patch! But I wonder what would be the behavior with your > patch in the following hw: > > # numactl --hardware > available: 2 nodes (0-1) > node 0 cpus: 0 2 4 6 8 10 12 14 > node 0 size: 16159 MB > node 0 free: 15308 MB > node 1 cpus: 1 3 5 7 9 11 13 15 > node 1 size: 16384 MB > node 1 free: 15028 MB > node distances: > node 0 1 > 0: 10 21 > 1: 21 10 Hi, In this case, I guess the topology looks like: 0 --+ +--+ 2 --+ | +-- ... --+ 4 --+ | | +--+ | 6 --+ | ... ... 9 --+ | +--+ | 11 --+ | | +-- ... -+ 13 --+ | +--+ 15 --+ And sched_domain would also reflect that. So the dl's push works well. Do I miss something? In addition, IMHO, it's not an issue for dl's push but one for building sched_domains. Wrong? Thanks, Byungchul