From: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
To: Venkatesh Pallipadi <venki@google.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org, Paul Turner <pjt@google.com>,
Mike Galbraith <efault@gmx.de>, Nick Piggin <npiggin@gmail.com>,
Tim Chen <tim.c.chen@intel.com>, Alex Shi <alex.shi@intel.com>
Subject: Re: [PATCH] sched: Wholesale removal of sd_idle logic
Date: Wed, 16 Feb 2011 14:23:03 +0530 [thread overview]
Message-ID: <20110216085303.GH11868@dirshya.in.ibm.com> (raw)
In-Reply-To: <AANLkTi=ENtUtgHYaCJqvDGYVFKyXYFcVVOOFf8-dfW=+@mail.gmail.com>
* Venkatesh Pallipadi <venki@google.com> [2011-02-15 10:26:01]:
<snip>
> >> @@ -3386,10 +3363,6 @@ redo:
> >> sd->balance_interval *= 2;
> >> }
> >>
> >> - if (!ld_moved && !sd_idle && sd->flags & SD_SHARE_CPUPOWER &&
> >> - !test_sd_parent(sd, SD_POWERSAVINGS_BALANCE))
> >> - ld_moved = -1;
> >
> > I have not figured out where ld_moved is checked for -1 and why we
> > need to treat this as a special case.
> >
>
> Return value of -1 was being consumed in rebalance domains() call
> to load_balance(). Returning -1 (instead of 0 in this case) makes
> rebalance_domains() to call higher domain load balancing
> with CPU_NOT_IDLE, when sibling is busy and even when there
> was no load pulled in.
Ok, so in rebalance_domain() we need not distinguish between 1 or -1
return code. We can set idle = CPU_NOT_IDLE as long as we pull
a task. With removal of sd_idle logic, the value of idle will remain
same for all domains.
Now in idle_balance() you have to check for return code > 0 in order
to reset this_rq->idle_stamp = 0. But in the next check:
if (pulled_task || time_after(jiffies, this_rq->next_balance)) {
/*
* We are going idle. next_balance may be set based on
* a busy processor. So reset next_balance.
*/
this_rq->next_balance = next_balance;
}
Earlier, we would push the next_balance interval for busy sibling case
since pulled_task will be set to -1. But now, with the removal of
sd_idle logic, the this_rq->next_balance will not be touched leading
to sooner rebalance.
In summary, the load_balance() will return 0 or 1, and the special
case of -1 is completely removed in the new code. Thanks for the
clarification.
--Vaidy
next prev parent reply other threads:[~2011-02-16 8:54 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-04 20:51 [PATCH] sched: Resolve sd_idle and first_idle_cpu Catch-22 Venkatesh Pallipadi
2011-02-04 21:25 ` [PATCH] sched: Resolve sd_idle and first_idle_cpu Catch-22 - v1 Venkatesh Pallipadi
2011-02-07 13:50 ` Peter Zijlstra
2011-02-07 18:21 ` Venkatesh Pallipadi
2011-02-07 19:53 ` Suresh Siddha
2011-02-08 17:37 ` Venkatesh Pallipadi
2011-02-08 18:13 ` Misc sd_idle related fixes Venkatesh Pallipadi
2011-02-09 9:29 ` Peter Zijlstra
2011-02-10 17:24 ` Venkatesh Pallipadi
2011-02-08 18:13 ` [PATCH 1/3] sched: Resolve sd_idle and first_idle_cpu Catch-22 Venkatesh Pallipadi
2011-02-08 18:13 ` [PATCH 2/3] sched: fix_up broken SMT load balance dilation Venkatesh Pallipadi
2011-02-08 18:13 ` [PATCH 3/3] sched: newidle balance set idle_timestamp only on successful pull Venkatesh Pallipadi
2011-02-09 3:37 ` Mike Galbraith
2011-02-09 15:55 ` [PATCH] sched: Resolve sd_idle and first_idle_cpu Catch-22 - v1 Peter Zijlstra
2011-02-12 1:20 ` Suresh Siddha
2011-02-14 22:38 ` [PATCH] sched: Wholesale removal of sd_idle logic Venkatesh Pallipadi
2011-02-15 17:01 ` Vaidyanathan Srinivasan
2011-02-15 18:26 ` Venkatesh Pallipadi
2011-02-16 8:53 ` Vaidyanathan Srinivasan [this message]
2011-02-16 11:43 ` Peter Zijlstra
2011-02-16 13:50 ` [tip:sched/core] " tip-bot for Venkatesh Pallipadi
2011-02-15 9:15 ` [PATCH] sched: Resolve sd_idle and first_idle_cpu Catch-22 - v1 Peter Zijlstra
2011-02-15 19:11 ` Suresh Siddha
2011-02-18 1:05 ` Alex,Shi
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=20110216085303.GH11868@dirshya.in.ibm.com \
--to=svaidy@linux.vnet.ibm.com \
--cc=alex.shi@intel.com \
--cc=efault@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=npiggin@gmail.com \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--cc=suresh.b.siddha@intel.com \
--cc=tim.c.chen@intel.com \
--cc=venki@google.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®