All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: ego@in.ibm.com
Cc: Jaswinder Singh Rajput <jaswinder@kernel.org>,
	Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>,
	linux-kernel@vger.kernel.org,
	Suresh Siddha <suresh.b.siddha@intel.com>,
	Balbir Singh <balbir@in.ibm.com>,
	Andi Kleen <andi@firstfloor.org>
Subject: Re: [PATCH v2 1/2] sched: Nominate idle load balancer from a semi-idle package.
Date: Fri, 03 Apr 2009 08:14:44 -0700	[thread overview]
Message-ID: <49D627E4.6070008@oracle.com> (raw)
In-Reply-To: <20090403145924.GB9563@in.ibm.com>

Gautham R Shenoy wrote:
> Hi Jaswinder,
> Thanks for the review. Comments interspersed.
> 
> 
> On Thu, Apr 02, 2009 at 09:22:11PM +0530, Jaswinder Singh Rajput wrote:
>> Here are some minor issues:
>>> diff --git a/kernel/sched.c b/kernel/sched.c
>>> index 706517c..4fc1ec0 100644
>>> --- a/kernel/sched.c
>>> +++ b/kernel/sched.c
> 
>>>  } nohz ____cacheline_aligned = {
>>>  	.load_balancer = ATOMIC_INIT(-1),
>>>  };
>>>  
>>> +#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT)
>>> +/**
>> ^^^^^^
>> This comment is not valid and even Randy send patches to fix these
>> comments and also shared the error messages because of these comments by
>> your earlier patches. Replace it with /*
> 
> I think you're referring to this: http://lkml.org/lkml/2009/3/29/7
> I had missed this patch. Thanks for pointing it out.
> 
> I think Randy's patch was addressing the issue of structs
> not requiring a /** style comments. But in this case,
> it's a function, and hence needs kernel-doc style notation. Or am I
> missing something here ? Point about the single-line
> short function description is well taken.

If you want to use kernel-doc for functions or structs or unions
or enums, do so.  Just use the correct syntax, please.

If it's not kernel-doc, don't use /** to begin the comment block.


>>> + * lowest_flag_domain: Returns the lowest sched_domain
>>> + * that has the given flag set for a particular cpu.
>>> + * @cpu: The cpu whose lowest level of sched domain is to
>>> + * be returned.
>>> + *
>>> + * @flag: The flag to check for the lowest sched_domain
>>> + * for the given cpu
>>> + */
>>> +static inline struct sched_domain *lowest_flag_domain(int cpu, int flag)
>>> +{
>>> +	struct sched_domain *sd;
>>> +
>>> +	for_each_domain(cpu, sd)
>>> +		if (sd && (sd->flags & flag))
>>> +			break;
>>> +
>>> +	return sd;
>>> +}
>>> +
>>> +/**
>> Ditto.
>>
> 
> Ditto :-)
> 
>>> + * for_each_flag_domain: Iterates over all the scheduler domains
>>> + * for a given cpu that has the 'flag' set, starting from
>>> + * the lowest to the highest.
>>> + * @cpu: The cpu whose domains we're iterating over.
>>> + * @sd: variable holding the value of the power_savings_sd
>>> + * for cpu
>> This can be come in one line:
> Agreed. Will correct this.
> 
>> + * @sd: variable holding the value of the power_savings_sd for cpu
>>
>>> + */
>>> +#define for_each_flag_domain(cpu, sd, flag) \
>>> +	for (sd = lowest_flag_domain(cpu, flag); \
>>> +		(sd && (sd->flags & flag)); sd = sd->parent)
>>> +
>>> +static inline int is_semi_idle_group(struct sched_group *ilb_group)
>>> +{
>>> +	cpumask_and(nohz.tmpmask, nohz.cpu_mask, sched_group_cpus(ilb_group));
>>> +
>>> +	/*
>>> +	 * A sched_group is semi-idle when it has atleast one busy cpu
>>> +	 * and atleast one idle cpu.
>>> +	 */
>>> +	if (!(cpumask_empty(nohz.tmpmask) ||
>>> +		cpumask_equal(nohz.tmpmask, sched_group_cpus(ilb_group))))
>>> +		return 1;
>>> +
>>> +	return 0;
>>> +}
>>> +/**
>> Ditto.
>>
> 
> Ditto!
>>> + * find_new_ilb: Finds or nominates a new idle load balancer.
>>> + * @cpu: The cpu which is nominating a new idle_load_balancer.
>>> + *
>>> + * This algorithm picks the idle load balancer such that it belongs to a
>>> + * semi-idle powersavings sched_domain. The idea is to try and avoid
>>> + * completely idle packages/cores just for the purpose of idle load balancing
>>> + * when there are other idle cpu's which are better suited for that job.
>>> + */
>>> +static int find_new_ilb(int cpu)


-- 
~Randy

  reply	other threads:[~2009-04-03 15:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-02 12:38 [PATCH v2 0/2] sched: Nominate a power-efficient ILB Gautham R Shenoy
2009-04-02 12:38 ` [PATCH v2 1/2] sched: Nominate idle load balancer from a semi-idle package Gautham R Shenoy
2009-04-02 15:52   ` Jaswinder Singh Rajput
2009-04-03 14:59     ` Gautham R Shenoy
2009-04-03 15:14       ` Randy Dunlap [this message]
2009-04-03  7:04   ` Andi Kleen
2009-04-03 15:11     ` Gautham R Shenoy
2009-04-02 12:38 ` [PATCH v2 2/2] sched: Nominate a power-efficient ilb in select_nohz_balancer() Gautham R Shenoy

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=49D627E4.6070008@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=andi@firstfloor.org \
    --cc=balbir@in.ibm.com \
    --cc=ego@in.ibm.com \
    --cc=jaswinder@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=suresh.b.siddha@intel.com \
    --cc=svaidy@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.