public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Jisheng Zhang <jszhang@marvell.com>
Cc: mingo@redhat.com, rafael.j.wysocki@intel.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched/fair: avoid !CONFIG_SMP cpufreq update callbacks when go idle
Date: Mon, 27 Jun 2016 10:37:21 +0200	[thread overview]
Message-ID: <20160627083721.GY30154@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1467014163-1517-1-git-send-email-jszhang@marvell.com>

On Mon, Jun 27, 2016 at 03:56:03PM +0800, Jisheng Zhang wrote:
> This is to avoid cpufreq update callbacks when we go idle on UP
> platforms.

How so? the patch only avoids calling the update for (!root) cgroups --
which makes sense, but I'm not seeing how that's related to going idle,
or UP at all.

> 
> Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
> ---
>  kernel/sched/fair.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index bdcbeea..236ec5b 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -3121,7 +3121,8 @@ static inline void update_load_avg(struct sched_entity *se, int not_used)
>  	struct cfs_rq *cfs_rq = cfs_rq_of(se);
>  	struct rq *rq = rq_of(cfs_rq);
>  
> -	cpufreq_trigger_update(rq_clock(rq));
> +	if (&rq->cfs == cfs_rq)
> +		cpufreq_trigger_update(rq_clock(rq));
>  }
>  
>  static inline void
> -- 
> 2.8.1
> 

  reply	other threads:[~2016-06-27  8:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-27  7:56 [PATCH] sched/fair: avoid !CONFIG_SMP cpufreq update callbacks when go idle Jisheng Zhang
2016-06-27  8:37 ` Peter Zijlstra [this message]
2016-06-27  8:43   ` Jisheng Zhang

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=20160627083721.GY30154@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=jszhang@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rafael.j.wysocki@intel.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