All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Michael Wang <wangyun@linux.vnet.ibm.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>, 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: Mon, 08 Apr 2013 12:00:49 +0200	[thread overview]
Message-ID: <1365415249.2609.145.camel@laptop> (raw)
In-Reply-To: <514FDF76.2060806@linux.vnet.ibm.com>

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.

Also, why not place this inside wake_affine() like you did the throttled
test.


  parent reply	other threads:[~2013-04-08 10:00 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 [this message]
2013-04-09  5:01   ` Michael Wang

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=1365415249.2609.145.camel@laptop \
    --to=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=pjt@google.com \
    --cc=wangyun@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.