mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [PATCH] sched/topology: Align group flags when removing degenerate domain
  2023-07-13  1:31 [PATCH] sched/topology: Align group flags when removing degenerate domain Chen Yu
@ 2023-07-12 18:36 ` Tim Chen
  2023-07-13  6:35 ` Yicong Yang
  2023-07-31 10:19 ` [tip: sched/core] " tip-bot2 for Chen Yu
  2 siblings, 0 replies; 4+ messages in thread
From: Tim Chen @ 2023-07-12 18:36 UTC (permalink / raw)
  To: Chen Yu, Peter Zijlstra, Juri Lelli, Vincent Guittot, Ingo Molnar
  Cc: Ricardo Neri, Tim Chen, Yicong Yang, linux-kernel

On Thu, 2023-07-13 at 09:31 +0800, Chen Yu wrote:
> The flags of the child of a given scheduling domain are used to initialize
> the flags of its scheduling groups. When the child of a scheduling domain
> is degenerated, the flags of its local scheduling group need to be updated
> to align with the flags of its new child domain.
> 
> The flag SD_SHARE_CPUCAPACITY was aligned in
> Commit bf2dc42d6beb ("sched/topology: Propagate SMT flags when removing degenerate domain").
> Further generalize this alignment so other flags can be used later, such as
> in cluster-based task wakeup. [1]
> 
> Link: https://lore.kernel.org/lkml/20230530115527.GC156198@hirez.programming.kicks-ass.net #1
> Suggested-by: Ricardo Neri <ricardo.neri@intel.com>
> Reported-by: Yicong Yang <yangyicong@huawei.com>
> Closes: https://lore.kernel.org/lkml/ce714341-af58-2522-69a8-321f02c82893@huawei.com/
> Signed-off-by: Chen Yu <yu.c.chen@intel.com>
> ---
>  kernel/sched/topology.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
> index d3a3b2646ec4..ff02d7deec0c 100644
> --- a/kernel/sched/topology.c
> +++ b/kernel/sched/topology.c
> @@ -722,8 +722,7 @@ cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu)
>  
>  			if (parent->parent) {
>  				parent->parent->child = tmp;
> -				if (tmp->flags & SD_SHARE_CPUCAPACITY)
> -					parent->parent->groups->flags |= SD_SHARE_CPUCAPACITY;
> +				parent->parent->groups->flags = tmp->flags;
>  			}
>  
>  			/*

Reviewed-by: Tim Chen <tim.c.chen@linux.intel.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] sched/topology: Align group flags when removing degenerate domain
@ 2023-07-13  1:31 Chen Yu
  2023-07-12 18:36 ` Tim Chen
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chen Yu @ 2023-07-13  1:31 UTC (permalink / raw)
  To: Peter Zijlstra, Juri Lelli, Vincent Guittot, Ingo Molnar
  Cc: Ricardo Neri, Tim Chen, Yicong Yang, linux-kernel, Chen Yu

The flags of the child of a given scheduling domain are used to initialize
the flags of its scheduling groups. When the child of a scheduling domain
is degenerated, the flags of its local scheduling group need to be updated
to align with the flags of its new child domain.

The flag SD_SHARE_CPUCAPACITY was aligned in
Commit bf2dc42d6beb ("sched/topology: Propagate SMT flags when removing degenerate domain").
Further generalize this alignment so other flags can be used later, such as
in cluster-based task wakeup. [1]

Link: https://lore.kernel.org/lkml/20230530115527.GC156198@hirez.programming.kicks-ass.net #1
Suggested-by: Ricardo Neri <ricardo.neri@intel.com>
Reported-by: Yicong Yang <yangyicong@huawei.com>
Closes: https://lore.kernel.org/lkml/ce714341-af58-2522-69a8-321f02c82893@huawei.com/
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
---
 kernel/sched/topology.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index d3a3b2646ec4..ff02d7deec0c 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -722,8 +722,7 @@ cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu)
 
 			if (parent->parent) {
 				parent->parent->child = tmp;
-				if (tmp->flags & SD_SHARE_CPUCAPACITY)
-					parent->parent->groups->flags |= SD_SHARE_CPUCAPACITY;
+				parent->parent->groups->flags = tmp->flags;
 			}
 
 			/*
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] sched/topology: Align group flags when removing degenerate domain
  2023-07-13  1:31 [PATCH] sched/topology: Align group flags when removing degenerate domain Chen Yu
  2023-07-12 18:36 ` Tim Chen
@ 2023-07-13  6:35 ` Yicong Yang
  2023-07-31 10:19 ` [tip: sched/core] " tip-bot2 for Chen Yu
  2 siblings, 0 replies; 4+ messages in thread
From: Yicong Yang @ 2023-07-13  6:35 UTC (permalink / raw)
  To: Chen Yu, Peter Zijlstra, Juri Lelli, Vincent Guittot, Ingo Molnar
  Cc: yangyicong, Ricardo Neri, Tim Chen, linux-kernel

On 2023/7/13 9:31, Chen Yu wrote:
> The flags of the child of a given scheduling domain are used to initialize
> the flags of its scheduling groups. When the child of a scheduling domain
> is degenerated, the flags of its local scheduling group need to be updated
> to align with the flags of its new child domain.
> 
> The flag SD_SHARE_CPUCAPACITY was aligned in
> Commit bf2dc42d6beb ("sched/topology: Propagate SMT flags when removing degenerate domain").
> Further generalize this alignment so other flags can be used later, such as
> in cluster-based task wakeup. [1]

Currently I only update the cluster flags on my current testing branch. It'll be even better to
align all flags for possible usage. Will rebase on this one.

> 
> Link: https://lore.kernel.org/lkml/20230530115527.GC156198@hirez.programming.kicks-ass.net #1
> Suggested-by: Ricardo Neri <ricardo.neri@intel.com>
> Reported-by: Yicong Yang <yangyicong@huawei.com>
> Closes: https://lore.kernel.org/lkml/ce714341-af58-2522-69a8-321f02c82893@huawei.com/
> Signed-off-by: Chen Yu <yu.c.chen@intel.com>

Reviewed-by: Yicong Yang <yangyicong@hisilicon.com>

> ---
>  kernel/sched/topology.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
> index d3a3b2646ec4..ff02d7deec0c 100644
> --- a/kernel/sched/topology.c
> +++ b/kernel/sched/topology.c
> @@ -722,8 +722,7 @@ cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu)
>  
>  			if (parent->parent) {
>  				parent->parent->child = tmp;
> -				if (tmp->flags & SD_SHARE_CPUCAPACITY)
> -					parent->parent->groups->flags |= SD_SHARE_CPUCAPACITY;
> +				parent->parent->groups->flags = tmp->flags;
>  			}
>  
>  			/*
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tip: sched/core] sched/topology: Align group flags when removing degenerate domain
  2023-07-13  1:31 [PATCH] sched/topology: Align group flags when removing degenerate domain Chen Yu
  2023-07-12 18:36 ` Tim Chen
  2023-07-13  6:35 ` Yicong Yang
@ 2023-07-31 10:19 ` tip-bot2 for Chen Yu
  2 siblings, 0 replies; 4+ messages in thread
From: tip-bot2 for Chen Yu @ 2023-07-31 10:19 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Yicong Yang, Ricardo Neri, Chen Yu, Peter Zijlstra (Intel),
	Tim Chen, Yicong Yang, x86, linux-kernel

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     4efcc8bc7e08c09c58a2f5cbc2096fbda5b7cf5e
Gitweb:        https://git.kernel.org/tip/4efcc8bc7e08c09c58a2f5cbc2096fbda5b7cf5e
Author:        Chen Yu <yu.c.chen@intel.com>
AuthorDate:    Thu, 13 Jul 2023 09:31:33 +08:00
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Wed, 26 Jul 2023 12:28:51 +02:00

sched/topology: Align group flags when removing degenerate domain

The flags of the child of a given scheduling domain are used to initialize
the flags of its scheduling groups. When the child of a scheduling domain
is degenerated, the flags of its local scheduling group need to be updated
to align with the flags of its new child domain.

The flag SD_SHARE_CPUCAPACITY was aligned in
Commit bf2dc42d6beb ("sched/topology: Propagate SMT flags when removing degenerate domain").
Further generalize this alignment so other flags can be used later, such as
in cluster-based task wakeup. [1]

Reported-by: Yicong Yang <yangyicong@huawei.com>
Suggested-by: Ricardo Neri <ricardo.neri@intel.com>
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Tim Chen <tim.c.chen@linux.intel.com>
Reviewed-by: Yicong Yang <yangyicong@hisilicon.com>
Link: https://lore.kernel.org/r/20230713013133.2314153-1-yu.c.chen@intel.com
---
 kernel/sched/topology.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index 7cfcfe5..05a5bc6 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -722,8 +722,7 @@ cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu)
 
 			if (parent->parent) {
 				parent->parent->child = tmp;
-				if (tmp->flags & SD_SHARE_CPUCAPACITY)
-					parent->parent->groups->flags |= SD_SHARE_CPUCAPACITY;
+				parent->parent->groups->flags = tmp->flags;
 			}
 
 			/*

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-31 10:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-13  1:31 [PATCH] sched/topology: Align group flags when removing degenerate domain Chen Yu
2023-07-12 18:36 ` Tim Chen
2023-07-13  6:35 ` Yicong Yang
2023-07-31 10:19 ` [tip: sched/core] " tip-bot2 for Chen Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome