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


Groups > linux.kernel > #1714679

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

From Byungchul Park <byungchul.park@lge.com>
Newsgroups linux.kernel
Subject [PATCH v8 0/2] Make find_later_rq() choose a closer cpu in topology
Date 2017-08-18 10:30 +0200
Message-ID <ufKPf-VO-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Thanks to Joel, I could fix a typo and simplify code more.

-----8<-----

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.

Change from v7
   -. fix a trivial typo
   -. modify commit messages to explain what it does more clearly
   -. simplify code with an existing macro

Change from v6
   -. add a comment about selection of fallback_cpu incase more than one exist
   -. modify a comment explaining what we do wrt PREFER_SIBLING

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 | 55 +++++++++++++++++++++++++++++++++++++++++++++---
 kernel/sched/rt.c       | 56 ++++++++++++++++++++++++++++++++++++++++++++++---
 2 files changed, 105 insertions(+), 6 deletions(-)

-- 
1.9.1

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


Thread

[PATCH v8 0/2] Make find_later_rq() choose a closer cpu in topology Byungchul Park <byungchul.park@lge.com> - 2017-08-18 10:30 +0200
  [PATCH v8 2/2] sched/rt: Add support for SD_PREFER_SIBLING on find_lowest_rq() Byungchul Park <byungchul.park@lge.com> - 2017-08-18 10:30 +0200
    Re: [PATCH v8 2/2] sched/rt: Add support for SD_PREFER_SIBLING on  find_lowest_rq() Steven Rostedt <rostedt@goodmis.org> - 2017-08-18 15:40 +0200
  [PATCH v8 1/2] sched/deadline: Add support for SD_PREFER_SIBLING on find_later_rq() Byungchul Park <byungchul.park@lge.com> - 2017-08-18 10:30 +0200
    Re: [PATCH v8 1/2] sched/deadline: Add support for SD_PREFER_SIBLING  on find_later_rq() Juri Lelli <juri.lelli@arm.com> - 2017-08-21 15:50 +0200
      Re: [PATCH v8 1/2] sched/deadline: Add support for SD_PREFER_SIBLING  on find_later_rq() Peter Zijlstra <peterz@infradead.org> - 2017-08-21 16:00 +0200
        Re: [PATCH v8 1/2] sched/deadline: Add support for SD_PREFER_SIBLING  on find_later_rq() Juri Lelli <juri.lelli@arm.com> - 2017-08-21 16:10 +0200
          Re: [PATCH v8 1/2] sched/deadline: Add support for SD_PREFER_SIBLING  on find_later_rq() Byungchul Park <byungchul.park@lge.com> - 2017-08-22 08:00 +0200
      Re: [PATCH v8 1/2] sched/deadline: Add support for SD_PREFER_SIBLING  on find_later_rq() Byungchul Park <byungchul.park@lge.com> - 2017-08-22 08:00 +0200
        Re: [PATCH v8 1/2] sched/deadline: Add support for SD_PREFER_SIBLING  on find_later_rq() Byungchul Park <byungchul.park@lge.com> - 2017-08-22 09:20 +0200
        Re: [PATCH v8 1/2] sched/deadline: Add support for SD_PREFER_SIBLING  on find_later_rq() Juri Lelli <juri.lelli@arm.com> - 2017-08-22 09:50 +0200

csiph-web