All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sched/fair: move nohz definition to where it's used
@ 2022-06-23 13:03 Chengming Zhou
  2022-07-05  7:50 ` Valentin Schneider
  0 siblings, 1 reply; 3+ messages in thread
From: Chengming Zhou @ 2022-06-23 13:03 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot, dietmar.eggemann,
	rostedt, bsegall, mgorman, bristot, vschneid
  Cc: linux-kernel, Chengming Zhou

The nohz definition is too far from where it's used, just move it
to the right place. No functional change.

Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
---
 kernel/sched/fair.c | 21 ++++++++-------------
 1 file changed, 8 insertions(+), 13 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 8bed75757e65..01f7047c41d7 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5842,19 +5842,6 @@ static void dequeue_task_fair(struct rq *rq, struct task_struct *p, int flags)
 DEFINE_PER_CPU(cpumask_var_t, load_balance_mask);
 DEFINE_PER_CPU(cpumask_var_t, select_idle_mask);
 
-#ifdef CONFIG_NO_HZ_COMMON
-
-static struct {
-	cpumask_var_t idle_cpus_mask;
-	atomic_t nr_cpus;
-	int has_blocked;		/* Idle CPUS has blocked load */
-	int needs_update;		/* Newly idle CPUs need their next_balance collated */
-	unsigned long next_balance;     /* in jiffy units */
-	unsigned long next_blocked;	/* Next update of blocked load in jiffies */
-} nohz ____cacheline_aligned;
-
-#endif /* CONFIG_NO_HZ_COMMON */
-
 static unsigned long cpu_load(struct rq *rq)
 {
 	return cfs_rq_load_avg(&rq->cfs);
@@ -10374,6 +10361,14 @@ static inline int on_null_domain(struct rq *rq)
  * - HK_TYPE_MISC CPUs are used for this task, because HK_TYPE_SCHED not set
  *   anywhere yet.
  */
+static struct {
+	cpumask_var_t idle_cpus_mask;
+	atomic_t nr_cpus;
+	int has_blocked;		/* Idle CPUS has blocked load */
+	int needs_update;		/* Newly idle CPUs need their next_balance collated */
+	unsigned long next_balance;     /* in jiffy units */
+	unsigned long next_blocked;	/* Next update of blocked load in jiffies */
+} nohz ____cacheline_aligned;
 
 static inline int find_new_ilb(void)
 {
-- 
2.36.1


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

* Re: [PATCH] sched/fair: move nohz definition to where it's used
  2022-06-23 13:03 [PATCH] sched/fair: move nohz definition to where it's used Chengming Zhou
@ 2022-07-05  7:50 ` Valentin Schneider
  2022-07-05  8:02   ` [External] " Chengming Zhou
  0 siblings, 1 reply; 3+ messages in thread
From: Valentin Schneider @ 2022-07-05  7:50 UTC (permalink / raw)
  To: Chengming Zhou, mingo, peterz, juri.lelli, vincent.guittot,
	dietmar.eggemann, rostedt, bsegall, mgorman, bristot
  Cc: linux-kernel, Chengming Zhou

On 23/06/22 21:03, Chengming Zhou wrote:
> The nohz definition is too far from where it's used, just move it
> to the right place. No functional change.
>
> Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>

Standalone cosmetic changes are very unlikely to get anywhere, I'd suggest
bundling this with some other non-cosmetic patches hitting the area.


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

* Re: [External] Re: [PATCH] sched/fair: move nohz definition to where it's used
  2022-07-05  7:50 ` Valentin Schneider
@ 2022-07-05  8:02   ` Chengming Zhou
  0 siblings, 0 replies; 3+ messages in thread
From: Chengming Zhou @ 2022-07-05  8:02 UTC (permalink / raw)
  To: Valentin Schneider, mingo, peterz, juri.lelli, vincent.guittot,
	dietmar.eggemann, rostedt, bsegall, mgorman, bristot
  Cc: linux-kernel

On 2022/7/5 15:50, Valentin Schneider wrote:
> On 23/06/22 21:03, Chengming Zhou wrote:
>> The nohz definition is too far from where it's used, just move it
>> to the right place. No functional change.
>>
>> Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
> 
> Standalone cosmetic changes are very unlikely to get anywhere, I'd suggest
> bundling this with some other non-cosmetic patches hitting the area.
> 

Right, make sense, just minor grumble when review the code, sorry for noise.

Thanks.

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

end of thread, other threads:[~2022-07-05  8:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-23 13:03 [PATCH] sched/fair: move nohz definition to where it's used Chengming Zhou
2022-07-05  7:50 ` Valentin Schneider
2022-07-05  8:02   ` [External] " Chengming Zhou

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.