From: Michael Wang <wangyun@linux.vnet.ibm.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>,
LKML <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>,
Namhyung Kim <namhyung@kernel.org>, Alex Shi <alex.shi@intel.com>,
Paul Turner <pjt@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
"Nikunj A. Dadhania" <nikunj@linux.vnet.ibm.com>,
Ram Pai <linuxram@us.ibm.com>
Subject: Re: [RFC PATCH] sched: wake-affine throttle
Date: Tue, 09 Apr 2013 13:01:11 +0800 [thread overview]
Message-ID: <5163A097.4050101@linux.vnet.ibm.com> (raw)
In-Reply-To: <1365415249.2609.145.camel@laptop>
On 04/08/2013 06:00 PM, Peter Zijlstra wrote:
> On Mon, 2013-03-25 at 13:24 +0800, Michael Wang wrote:
>> if (affine_sd) {
>> - if (cpu != prev_cpu && wake_affine(affine_sd, p,
>> sync))
>> + if (cpu != prev_cpu && wake_affine(affine_sd, p,
>> sync)) {
>> + /*
>> + * wake_affine() stuff try to pull wakee to
>> the cpu
>> + * around waker, this will benefit us if the
>> data
>> + * cached on waker cpu is hot for wakee, or
>> the extreme
>> + * ping-pong case.
>> + *
>> + * However, do such blindly work too
>> frequently will
>> + * cause regression to some workload, thus,
>> each time
>> + * when wake_affine() succeed, throttle it for
>> a while.
>> + */
>> + wake_affine_throttle(p);
>> prev_cpu = cpu;
>> + }
>
> How about only throttling when wake_affine() starts returning false? At
> that point its lost its benefit.
Honestly, I used to think this won't work, but the testing results show
it even better than throttle on succeed...your suggestion is correct, it
will be applied to the next version.
But please allow me to express my concern here:
In summary, I don't think 'return false' is the only point wake-affine
lost it's benefit.
When wake-affine return true, the only thing guaranteed is the balance,
but what about the factors like:
1. wakee has no hot data cached on curr_cpu
2. hot data cached on curr_cpu for wakee is less than those on prev_cpu
3. wakee has no relationship with waker at all
...
Those factors was unconsidered when wake_affine() return true, but they
could be a reason for regression too, isn't it?
Anyway, according to the test results, the benefit of wake-affine
reserved by 'throttle on failed' is impressive, those factors failed to
defend them self...
>
> Also, why not place this inside wake_affine() like you did the throttled
> test.
That's right, will correct it :)
Regards,
Michael Wang
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
prev parent reply other threads:[~2013-04-09 5:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-25 5:24 [RFC PATCH] sched: wake-affine throttle Michael Wang
2013-03-25 9:22 ` Mike Galbraith
2013-03-25 10:21 ` Michael Wang
2013-03-25 14:31 ` Mike Galbraith
2013-03-26 2:45 ` Michael Wang
2013-04-08 2:08 ` Michael Wang
2013-04-08 10:00 ` Peter Zijlstra
2013-04-09 5:01 ` Michael Wang [this message]
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=5163A097.4050101@linux.vnet.ibm.com \
--to=wangyun@linux.vnet.ibm.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=alex.shi@intel.com \
--cc=efault@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxram@us.ibm.com \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=nikunj@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=pjt@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