All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sched/fair: cleanup master/slave usage in wake_wide()
@ 2021-05-30 19:30 trix
  2021-05-31  7:18 ` Peter Zijlstra
  0 siblings, 1 reply; 2+ messages in thread
From: trix @ 2021-05-30 19:30 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot, dietmar.eggemann,
	rostedt, bsegall, mgorman, bristot
  Cc: linux-kernel, Tom Rix

From: Tom Rix <trix@redhat.com>

From Documentation/process/coding-style section for
inclusive terminology, make these variable name changes in
wake_wide()

master -> primary
slave -> secondary

Signed-off-by: Tom Rix <trix@redhat.com>
---
 kernel/sched/fair.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 161b92aa1c79..ade9f065c690 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5754,13 +5754,13 @@ static void record_wakee(struct task_struct *p)
  */
 static int wake_wide(struct task_struct *p)
 {
-	unsigned int master = current->wakee_flips;
-	unsigned int slave = p->wakee_flips;
+	unsigned int primary = current->wakee_flips;
+	unsigned int secondary = p->wakee_flips;
 	int factor = __this_cpu_read(sd_llc_size);
 
-	if (master < slave)
-		swap(master, slave);
-	if (slave < factor || master < slave * factor)
+	if (primary < secondary)
+		swap(primary, secondary);
+	if (secondary < factor || primary < secondary * factor)
 		return 0;
 	return 1;
 }
-- 
2.26.3


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

* Re: [PATCH] sched/fair: cleanup master/slave usage in wake_wide()
  2021-05-30 19:30 [PATCH] sched/fair: cleanup master/slave usage in wake_wide() trix
@ 2021-05-31  7:18 ` Peter Zijlstra
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Zijlstra @ 2021-05-31  7:18 UTC (permalink / raw)
  To: trix
  Cc: mingo, juri.lelli, vincent.guittot, dietmar.eggemann, rostedt,
	bsegall, mgorman, bristot, linux-kernel

On Sun, May 30, 2021 at 12:30:39PM -0700, trix@redhat.com wrote:
> From: Tom Rix <trix@redhat.com>
> 
> From Documentation/process/coding-style section for
> inclusive terminology, make these variable name changes in
> wake_wide()
> 
> master -> primary
> slave -> secondary
> 
> Signed-off-by: Tom Rix <trix@redhat.com>

Please take your nonsense elsewhere. Unless there's a technical reason
to change this code, don't touch it.

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

end of thread, other threads:[~2021-05-31  7:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-30 19:30 [PATCH] sched/fair: cleanup master/slave usage in wake_wide() trix
2021-05-31  7:18 ` Peter Zijlstra

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.