Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1714562

Re: [PATCH v6 0/2] Make find_later_rq() choose a closer cpu in topology

Path csiph.com!news.mixmin.net!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod
From "Joel Fernandes (Google)" <joel.opensrc@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v6 0/2] Make find_later_rq() choose a closer cpu in topology
Date Fri, 18 Aug 2017 07:00:02 +0200
Message-ID <ufHy2-6Rd-5@gated-at.bofh.it> (permalink)
References <ubHmV-2YE-7@gated-at.bofh.it> <ufEgP-4CU-17@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=RIrVZ4NI0DBP1SbmQ5UZxZMnht94kVo2M83Z8LL3KOc=; b=rXyqfH9VkpdC1cj1YqljbMup0pVQB02Xeb68NBqye4UVS2b7O+6D0NtLldElzj0Yot Gb4EAqD/fl/WJC8mAOJWB1g8XjokwhTtkqvoyq/HDJ/afJmKphXx8kF37O1n1rLaXJld 5gqI03+FxDj4ewxIT3wqtz2S1uT55u92xg4eHXrJy8RvW+UO4OJwnt/fPBo3lUSv53pz S17x/LiObXij9NQr2iktzmRgsel/RZ+1grx9HMqPzB0brQT9guIuLg6CkpnW+eOc4Iy0 mkEiDKFW0/bxA3CYObg1sRgygbhueDEesaW+TxLzYwKV/dBBVnSH6oSRZNiODyIiOZnZ 7R/w==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=RIrVZ4NI0DBP1SbmQ5UZxZMnht94kVo2M83Z8LL3KOc=; b=AfSAn4spDDSlOwZhzzD63WSOCmFm7CBnRxMtLk51h1fwLp7lFdbFd99Dc7VfaV/rDx 0ANIyyGhAGy/TG8/0nGYnRxItFsXTc/aruR7vTWB8DFk3TDtWOL2uS71hcN2kphd+lXw eL+6Cjg4D2mzRPXLqCHw2uemywmE2jh5FboqrDxZMZDhPYDx0yfvrktiiiAfy2+HJ2d1 KKSoPruLJSpAE/GufkZBL+IIWGRbTp6YbhGAL7Jx7zEBEth8GGbRfw7ts7r8zJLgaY2M rEc+Odqr4l51pRviAXy4EFdARvXI1/NB1X1Xx0qFb4XhCQtLeY2SEd5/ugsh//ODXCxu 9Pmw==
X-Gm-Message-State AHYfb5gviZSlJx62XgXFvXWYCNG3vfaYp5oMJc7cyg0nyY235Jx/16H4 0IHjiCSH3leI2SR5fJqi3hQBeKhrog==
X-Received by 10.80.225.135 with SMTP id k7mr3601397edl.91.1503031895278; Thu, 17 Aug 2017 21:51:35 -0700 (PDT)
MIME-Version 1.0
Content-Type text/plain; charset="UTF-8"
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 87
Organization linux.* mail to news gateway
X-Original-Cc Peter Zijlstra <peterz@infradead.org>, mingo@kernel.org, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, juri.lelli@gmail.com, rostedt@goodmis.org, kernel-team@lge.com
X-Original-Date Thu, 17 Aug 2017 21:51:34 -0700
X-Original-Message-ID <CAEi0qN=i7ZCmzrEKQ1DWTjx4FB3gZVUzJ6bTgb4HLU09k0C9dw@mail.gmail.com>
X-Original-References <1502077834-11137-1-git-send-email-byungchul.park@lge.com> <20170818012555.GY20323@X58A-UD3R>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1714562

Show key headers only | View raw


On Thu, Aug 17, 2017 at 6:25 PM, Byungchul Park <byungchul.park@lge.com> wrote:
> On Mon, Aug 07, 2017 at 12:50:32PM +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.
>
> Could you let me know your opinions about this?

Patch looks good to me, I would also add a comment ontop of
fallback_cpu (I think Steve mentioned similar thing at [1])

/*
 * fallback is the closest CPU in the closest SD incase
 * all domains are PREFER_SIBLING
 */
 if (fallback_cpu == -1)
     fallback_cpu = best_cpu;

And clarify this in the commit message.


thanks,

-Joel

[1] https://patchwork.kernel.org/patch/9884383/


>
>> Change from v5
>>    -. exclude two patches already picked up by peterz
>>       (sched/deadline: Make find_later_rq() choose a closer cpu in topology)
>>       (sched/deadline: Change return value of cpudl_find())
>>    -. apply what peterz fixed for 'prefer sibling', into deadline and rt
>>
>> Change from v4
>>    -. remove a patch that might cause huge lock contention
>>       (by spin lock(&cpudl.lock) in a hot path of scheduler)
>>
>> Change from v3
>>    -. rename closest_cpu to best_cpu so that it align with rt
>>    -. protect referring cpudl.elements with cpudl.lock
>>    -. change return value of cpudl_find() to bool
>>
>> Change from v2
>>    -. add support for SD_PREFER_SIBLING
>>
>> Change from v1
>>    -. clean up the patch
>>
>> Byungchul Park (2):
>>   sched/deadline: Add support for SD_PREFER_SIBLING on find_later_rq()
>>   sched/rt: Add support for SD_PREFER_SIBLING on find_lowest_rq()
>>
>>  kernel/sched/deadline.c | 46 +++++++++++++++++++++++++++++++++++++++++++---
>>  kernel/sched/rt.c       | 47 ++++++++++++++++++++++++++++++++++++++++++++---
>>  2 files changed, 87 insertions(+), 6 deletions(-)
>>
>> --
>> 1.9.1

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v6 0/2]  Make find_later_rq() choose a closer cpu in  topology Byungchul Park <byungchul.park@lge.com> - 2017-08-18 03:30 +0200
  Re: [PATCH v6 0/2] Make find_later_rq() choose a closer cpu in topology "Joel Fernandes (Google)" <joel.opensrc@gmail.com> - 2017-08-18 07:00 +0200
    Re: [PATCH v6 0/2] Make find_later_rq() choose a closer cpu in  topology Byungchul Park <byungchul.park@lge.com> - 2017-08-18 07:40 +0200

csiph-web