linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: alex.shi@intel.com (Alex Shi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/6] sched: add a new SD SHARE_POWERLINE flag for sched_domain
Date: Thu, 13 Dec 2012 10:24:00 +0800	[thread overview]
Message-ID: <50C93C40.8020101@intel.com> (raw)
In-Reply-To: <1355319092-30980-3-git-send-email-vincent.guittot@linaro.org>

On 12/12/2012 09:31 PM, Vincent Guittot wrote:
> This new flag SD_SHARE_POWERDOMAIN is used to reflect whether groups of CPU in
> a sched_domain level can or not reach a different power state. If clusters can
> be power gated independently, as an example, the flag should be cleared at CPU
> level. This information is used to decide if it's worth packing some tasks in
> a group of CPUs in order to power gated the other groups instead of spreading
> the tasks. The default behavior of the scheduler is to spread tasks so the
> flag is set into all sched_domains
> 
> Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
> ---
>  arch/ia64/include/asm/topology.h |    1 +
>  arch/tile/include/asm/topology.h |    1 +
>  include/linux/sched.h            |    1 +
>  include/linux/topology.h         |    4 ++++
>  kernel/sched/core.c              |    6 ++++++
>  5 files changed, 13 insertions(+)
> 
> diff --git a/arch/ia64/include/asm/topology.h b/arch/ia64/include/asm/topology.h
> index a2496e4..6d0b617 100644
> --- a/arch/ia64/include/asm/topology.h
> +++ b/arch/ia64/include/asm/topology.h
> @@ -65,6 +65,7 @@ void build_cpu_to_node_map(void);
>  				| SD_BALANCE_EXEC	\
>  				| SD_BALANCE_FORK	\
>  				| SD_WAKE_AFFINE,	\
> +				| arch_sd_local_flags(0)\
>  	.last_balance		= jiffies,		\
>  	.balance_interval	= 1,			\
>  	.nr_balance_failed	= 0,			\
> diff --git a/arch/tile/include/asm/topology.h b/arch/tile/include/asm/topology.h
> index d5e86c9..adc8710 100644
> --- a/arch/tile/include/asm/topology.h
> +++ b/arch/tile/include/asm/topology.h
> @@ -71,6 +71,7 @@ static inline const struct cpumask *cpumask_of_node(int node)
>  				| 0*SD_WAKE_AFFINE			\
>  				| 0*SD_SHARE_CPUPOWER			\
>  				| 0*SD_SHARE_PKG_RESOURCES		\
> +				| arch_sd_local_flags(0)		\
>  				| 0*SD_SERIALIZE			\
>  				,					\
>  	.last_balance		= jiffies,				\
> diff --git a/include/linux/sched.h b/include/linux/sched.h
> index 046e39a..3287be1 100644
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@ -844,6 +844,7 @@ enum cpu_idle_type {
>  #define SD_BALANCE_WAKE		0x0010  /* Balance on wakeup */
>  #define SD_WAKE_AFFINE		0x0020	/* Wake task to waking CPU */
>  #define SD_SHARE_CPUPOWER	0x0080	/* Domain members share cpu power */
> +#define SD_SHARE_POWERDOMAIN	0x0100	/* Domain members share power domain */
>  #define SD_SHARE_PKG_RESOURCES	0x0200	/* Domain members share cpu pkg resources */
>  #define SD_SERIALIZE		0x0400	/* Only a single load balancing instance */
>  #define SD_ASYM_PACKING		0x0800  /* Place busy groups earlier in the domain */
> diff --git a/include/linux/topology.h b/include/linux/topology.h
> index d3cf0d6..3eab293 100644
> --- a/include/linux/topology.h
> +++ b/include/linux/topology.h
> @@ -99,6 +99,8 @@ int arch_update_cpu_topology(void);
>  				| 1*SD_WAKE_AFFINE			\
>  				| 1*SD_SHARE_CPUPOWER			\
>  				| 1*SD_SHARE_PKG_RESOURCES		\
> +				| arch_sd_local_flags(SD_SHARE_CPUPOWER|\
> +						SD_SHARE_PKG_RESOURCES) \
>  				| 0*SD_SERIALIZE			\
>  				| 0*SD_PREFER_SIBLING			\
>  				| arch_sd_sibling_asym_packing()	\
> @@ -131,6 +133,7 @@ int arch_update_cpu_topology(void);
>  				| 1*SD_WAKE_AFFINE			\
>  				| 0*SD_SHARE_CPUPOWER			\
>  				| 1*SD_SHARE_PKG_RESOURCES		\
> +				| arch_sd_local_flags(SD_SHARE_PKG_RESOURCES)\
>  				| 0*SD_SERIALIZE			\
>  				,					\
>  	.last_balance		= jiffies,				\
> @@ -161,6 +164,7 @@ int arch_update_cpu_topology(void);
>  				| 1*SD_WAKE_AFFINE			\
>  				| 0*SD_SHARE_CPUPOWER			\
>  				| 0*SD_SHARE_PKG_RESOURCES		\
> +				| arch_sd_local_flags(0)		\

The general style looks like prefering SD_XXX flag directly.

  reply	other threads:[~2012-12-13  2:24 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-12 13:31 [RFC PATCH v2 0/6] sched: packing small tasks Vincent Guittot
2012-12-12 13:31 ` RFC PATCH v2 1/6] Revert "sched: introduce temporary FAIR_GROUP_SCHED dependency for load-tracking" Vincent Guittot
2012-12-12 13:31 ` [PATCH 2/6] sched: add a new SD SHARE_POWERLINE flag for sched_domain Vincent Guittot
2012-12-13  2:24   ` Alex Shi [this message]
2012-12-13  8:53     ` Vincent Guittot
2012-12-12 13:31 ` [RFC PATCH v2 3/6] sched: pack small tasks Vincent Guittot
2012-12-13  2:17   ` Alex Shi
2012-12-13  2:43     ` Alex Shi
2012-12-13 10:11     ` Vincent Guittot
2012-12-13 14:25       ` Alex Shi
2012-12-13 14:53         ` Vincent Guittot
2012-12-13 15:48           ` Vincent Guittot
2012-12-14  1:46             ` Alex Shi
2012-12-14  9:33               ` Vincent Guittot
2012-12-16  7:12                 ` Alex Shi
2012-12-17  9:40                   ` Vincent Guittot
2012-12-17 15:24                     ` Alex Shi
2012-12-18  9:53                       ` Vincent Guittot
2012-12-18 11:29                         ` Alex Shi
2012-12-14  4:45         ` Mike Galbraith
2012-12-14  6:36           ` Alex Shi
2012-12-14  7:45             ` Mike Galbraith
2012-12-14  7:57               ` Alex Shi
2012-12-14 10:43               ` Vincent Guittot
2012-12-15  6:40                 ` Mike Galbraith
2012-12-17  3:13           ` Alex Shi
2012-12-21  5:47       ` Namhyung Kim
2012-12-21  8:53         ` Vincent Guittot
2012-12-21  8:59           ` Vincent Guittot
2012-12-12 13:31 ` [RFC PATCH v2 4/6] sched: secure access to other CPU statistics Vincent Guittot
2012-12-12 13:31 ` [RFC PATCH v2 5/6] sched: pack the idle load balance Vincent Guittot
2012-12-12 13:31 ` [RFC PATCH v2 6/6] ARM: sched: clear SD_SHARE_POWERLINE Vincent Guittot

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=50C93C40.8020101@intel.com \
    --to=alex.shi@intel.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).