public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Shi <alex.shi@linaro.org>
To: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: mingo@redhat.com, peterz@infradead.org, morten.rasmussen@arm.com,
	vincent.guittot@linaro.org, daniel.lezcano@linaro.org,
	fweisbec@gmail.com, linux@arm.linux.org.uk, tony.luck@intel.com,
	fenghua.yu@intel.com, james.hogan@imgtec.com, jason.low2@hp.com,
	viresh.kumar@linaro.org, hanjun.guo@linaro.org,
	linux-kernel@vger.kernel.org, tglx@linutronix.de,
	akpm@linux-foundation.org, arjan@linux.intel.com, pjt@google.com,
	fengguang.wu@intel.com, linaro-kernel@lists.linaro.org,
	wangyun@linux.vnet.ibm.com, mgorman@suse.de
Subject: Re: [PATCH 02/11] sched: remove rq->cpu_load[load_idx] array
Date: Wed, 26 Feb 2014 09:54:44 +0800	[thread overview]
Message-ID: <530D4964.7060301@linaro.org> (raw)
In-Reply-To: <20140225162252.GA13532@linux.vnet.ibm.com>

On 02/26/2014 12:22 AM, Srikar Dronamraju wrote:
>>  
>> -/**
>> - * get_sd_load_idx - Obtain the load index for a given sched domain.
>> - * @sd: The sched_domain whose load_idx is to be obtained.
>> - * @idle: The idle status of the CPU for whose sd load_idx is obtained.
>> - *
>> - * Return: The load index.
>> - */
>> -static inline int get_sd_load_idx(struct sched_domain *sd,
>> -					enum cpu_idle_type idle)
>> -{
>> -	int load_idx;
>> -
>> -	switch (idle) {
>> -	case CPU_NOT_IDLE:
>> -		load_idx = sd->busy_idx;
>> -		break;
>> -
>> -	case CPU_NEWLY_IDLE:
>> -		load_idx = sd->newidle_idx;
>> -		break;
>> -	default:
>> -		load_idx = sd->idle_idx;
>> -		break;
>> -	}
>> -
>> -	return load_idx;
>> -}
>> -
> 
> Since the last caller to get_sd_load_idx(), does it make sense to remove
> the function definition for get_sd_load_idx() in the previous patch itself?

yes. it's reasonable.
> 
> Or
> 
>> @@ -5903,13 +5868,11 @@ static inline void update_sd_lb_stats(struct lb_env *env, struct sd_lb_stats *sd
>>  	struct sched_domain *child = env->sd->child;
>>  	struct sched_group *sg = env->sd->groups;
>>  	struct sg_lb_stats tmp_sgs;
>> -	int load_idx, prefer_sibling = 0;
>> +	int prefer_sibling = 0;
>>  
>>  	if (child && child->flags & SD_PREFER_SIBLING)
>>  		prefer_sibling = 1;
>>  
>> -	load_idx = 0;
>> -
>>  	do {
>>  		struct sg_lb_stats *sgs = &tmp_sgs;
>>  		int local_group;
> 
> 
> The single line change in the previous patch gets removed here so why
> not club them.

Uh, the first patch want to just show the load_idx connection in current
logical.

Yes, we can club them, but this connection will be flooded in code.



-- 
Thanks
    Alex

  reply	other threads:[~2014-02-26  1:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-25  1:50 [PATCH V4 0/11] sched: remove cpu_loads Alex Shi
2014-02-25  1:50 ` [PATCH 01/11] sched: shortcut to remove load_idx Alex Shi
2014-02-25  1:50 ` [PATCH 02/11] sched: remove rq->cpu_load[load_idx] array Alex Shi
2014-02-25 16:22   ` Srikar Dronamraju
2014-02-26  1:54     ` Alex Shi [this message]
2014-02-25  1:50 ` [PATCH 03/11] sched: clean up cpu_load update Alex Shi
2014-02-25  1:50 ` [PATCH 04/11] sched: unify imbalance bias for target group Alex Shi
2014-02-25 14:14   ` Peter Zijlstra
2014-02-26 15:16     ` Alex Shi
2014-03-02  1:44       ` Alex Shi
2014-03-12 10:36       ` Alex Shi
2014-02-25  1:50 ` [PATCH 05/11] sched: rewrite update_cpu_load_nohz Alex Shi
2014-02-25  1:50 ` [PATCH 06/11] sched: clean up source_load/target_load Alex Shi
2014-02-25  1:50 ` [PATCH 07/11] sched: replace source_load by weighted_cpuload Alex Shi
2014-02-25  1:50 ` [PATCH 08/11] sched: replace target_load by biased_load Alex Shi
2014-02-25  1:50 ` [PATCH 09/11] sched: remove rq->cpu_load and rq->nr_load_updates Alex Shi
2014-02-25  1:50 ` [PATCH 10/11] sched: rename update_*_cpu_load Alex Shi
2014-02-25  1:50 ` [PATCH 11/11] sched: clean up task_hot function 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=530D4964.7060301@linaro.org \
    --to=alex.shi@linaro.org \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@linux.intel.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=fengguang.wu@intel.com \
    --cc=fenghua.yu@intel.com \
    --cc=fweisbec@gmail.com \
    --cc=hanjun.guo@linaro.org \
    --cc=james.hogan@imgtec.com \
    --cc=jason.low2@hp.com \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=morten.rasmussen@arm.com \
    --cc=peterz@infradead.org \
    --cc=pjt@google.com \
    --cc=srikar@linux.vnet.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox