lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 26 Feb 2014 09:53:09 -0800
From:	bsegall@...gle.com
To:	Dietmar Eggemann <dietmar.eggemann@....com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sched: put rq's sched_avg under CONFIG_FAIR_GROUP_SCHED

Dietmar Eggemann <dietmar.eggemann@....com> writes:

> On 25/02/14 20:52, Peter Zijlstra wrote:
>> On Tue, Feb 25, 2014 at 11:47:42AM +0000, Dietmar Eggemann wrote:
>>> +++ b/kernel/sched/sched.h
>>> @@ -630,7 +630,9 @@ struct rq {
>>>  	struct llist_head wake_list;
>>>  #endif
>>>  
>>> +#ifdef CONFIG_FAIR_GROUP_SCHED
>>>  	struct sched_avg avg;
>>> +#endif
>>>  };
>> 
>> There is already a CONFIG_FAIR_GROUP_SCHED #ifdef in that structure;
>> does it make sense to move this variable in there instead of adding yet
>> another #ifdef?
>> 
>
> I changed the patch accordingly.
>
> -- >8 --
> Subject: [PATCH] sched: put rq's sched_avg under CONFIG_FAIR_GROUP_SCHED
>
> The struct sched_avg of struct rq is only used in case group
> scheduling is enabled inside __update_tg_runnable_avg() to update
> per-cpu representation of a task group.  I.e. that there is no need to
> maintain the runnable avg of a rq in the !CONFIG_FAIR_GROUP_SCHED case.
>
> This patch guards struct sched_avg of struct rq and
> update_rq_runnable_avg() with CONFIG_FAIR_GROUP_SCHED.
>
> There is an extra empty definition for update_rq_runnable_avg()
> necessary for the !CONFIG_FAIR_GROUP_SCHED && CONFIG_SMP case.
>
> The function print_cfs_group_stats() which prints out struct sched_avg
> of struct rq is already guarded with CONFIG_FAIR_GROUP_SCHED.
>
> Signed-off-by: Dietmar Eggemann <dietmar.eggemann@....com>
Reviewed-by: Ben Segall <bsegall@...gle.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ