mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Byungchul Park <byungchul.park@lge.com>
To: peterz@infradead.org, mingo@kernel.org
Cc: joel.opensrc@gmail.com, linux-kernel@vger.kernel.org,
	juri.lelli@gmail.com, rostedt@goodmis.org, kernel-team@lge.com
Subject: [PATCH v7 0/2] Make find_later_rq() choose a closer cpu in topology
Date: Fri, 18 Aug 2017 15:05:11 +0900	[thread overview]
Message-ID: <1503036313-15044-1-git-send-email-byungchul.park@lge.com> (raw)

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 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

             reply	other threads:[~2017-08-18  6:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-18  6:05 Byungchul Park [this message]
2017-08-18  6:05 ` [PATCH v7 1/2] sched/deadline: Add support for SD_PREFER_SIBLING on find_later_rq() Byungchul Park
2017-08-18  7:21   ` Joel Fernandes (Google)
2017-08-18  7:55     ` Byungchul Park
2017-08-18  6:05 ` [PATCH v7 2/2] sched/rt: Add support for SD_PREFER_SIBLING on find_lowest_rq() Byungchul Park
2017-08-18 13:31   ` Steven Rostedt
2017-08-18  6:38 ` [PATCH v7 0/2] Make find_later_rq() choose a closer cpu in topology Byungchul Park

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1503036313-15044-1-git-send-email-byungchul.park@lge.com \
    --to=byungchul.park@lge.com \
    --cc=joel.opensrc@gmail.com \
    --cc=juri.lelli@gmail.com \
    --cc=kernel-team@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®