mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Subhra Mazumdar <subhra.mazumdar@oracle.com>
To: kbuild test robot <lkp@intel.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
	peterz@infradead.org, mingo@redhat.com,
	steven.sistare@oracle.com, dhaval.giani@oracle.com,
	rohit.k.jain@oracle.com, daniel.lezcano@linaro.org
Subject: Re: [PATCH 1/5] sched: limit cpu search in select_idle_cpu
Date: Tue, 12 Jun 2018 15:12:50 -0700	[thread overview]
Message-ID: <e128778b-c079-700b-ffad-4749e66d3bbb@oracle.com> (raw)
In-Reply-To: <201806130240.AQdYDV0h%fengguang.wu@intel.com>



On 06/12/2018 01:33 PM, kbuild test robot wrote:
> Hi subhra,
>
> Thank you for the patch! Perhaps something to improve:
>
> [auto build test WARNING on tip/sched/core]
> [also build test WARNING on v4.17 next-20180612]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
> url:    https://github.com/0day-ci/linux/commits/subhra-mazumdar/Improve-scheduler-scalability-for-fast-path/20180613-015158
> config: i386-randconfig-x070-201823 (attached as .config)
> compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
> reproduce:
>          # save the attached .config to linux build tree
>          make ARCH=i386
>
> All warnings (new ones prefixed by >>):
>
>     kernel/sched/fair.c: In function 'select_idle_cpu':
>>> kernel/sched/fair.c:6396:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
>        u64 span_avg = sd->span_weight * avg_idle;
>        ^~~
>
>
<snip>

I fixed this patch, please try the following

---8<---

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index e497c05..7243146 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6372,7 +6372,7 @@ static int select_idle_cpu(struct task_struct *p, 
struct sched_domain *sd, int t
         u64 avg_cost, avg_idle;
         u64 time, cost;
         s64 delta;
-       int cpu, nr = INT_MAX;
+       int cpu, limit, floor, nr = INT_MAX;

         this_sd = rcu_dereference(*this_cpu_ptr(&sd_llc));
         if (!this_sd)
@@ -6390,10 +6390,17 @@ static int select_idle_cpu(struct task_struct 
*p, struct sched_domain *sd, int t

         if (sched_feat(SIS_PROP)) {
                 u64 span_avg = sd->span_weight * avg_idle;
-               if (span_avg > 4*avg_cost)
+               floor = cpumask_weight(topology_sibling_cpumask(target));
+               if (floor < 2)
+                       floor = 2;
+               limit = 2*floor;
+               if (span_avg > floor*avg_cost) {
                         nr = div_u64(span_avg, avg_cost);
-               else
-                       nr = 4;
+                       if (nr > limit)
+                               nr = limit;
+               } else {
+                       nr = floor;
+               }
         }

         time = local_clock();


  reply	other threads:[~2018-06-12 22:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-12 17:49 [RFC/RFT V2 PATCH 0/5] Improve scheduler scalability for fast path subhra mazumdar
2018-06-12 17:49 ` [PATCH 1/5] sched: limit cpu search in select_idle_cpu subhra mazumdar
2018-06-12 20:33   ` kbuild test robot
2018-06-12 22:12     ` Subhra Mazumdar [this message]
2018-06-20  7:32   ` [lkp-robot] [sched] 8dd662615c: reaim.jobs_per_min -3.3% regression kernel test robot
2018-06-12 17:49 ` [PATCH 2/5] sched: introduce per-cpu var next_cpu to track search limit subhra mazumdar
2018-06-12 17:50 ` [PATCH 3/5] sched: rotate the cpu search window for better spread subhra mazumdar
2018-06-12 17:50 ` [PATCH 4/5] sched: add sched feature to disable idle core search subhra mazumdar
2018-06-12 17:50 ` [PATCH 5/5] sched: SIS_CORE " subhra mazumdar
2018-06-28 22:44 [RESEND RFC/RFT V2 PATCH 0/5] Improve scheduler scalability for fast path subhra mazumdar
2018-06-28 22:44 ` [PATCH 1/5] sched: limit cpu search in select_idle_cpu subhra mazumdar

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=e128778b-c079-700b-ffad-4749e66d3bbb@oracle.com \
    --to=subhra.mazumdar@oracle.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=dhaval.giani@oracle.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rohit.k.jain@oracle.com \
    --cc=steven.sistare@oracle.com \
    /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®