linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sched/fair: Use __this_cpu_read() in wake_wide()
@ 2020-04-21 14:41 Muchun Song
  2020-05-01 18:22 ` [tip: sched/core] " tip-bot2 for Muchun Song
  0 siblings, 1 reply; 2+ messages in thread
From: Muchun Song @ 2020-04-21 14:41 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot, dietmar.eggemann,
	rostedt, bsegall, mgorman
  Cc: linux-kernel, Muchun Song

The code is executed with preemption(and interrupts) disabled,
so it's safe to use __this_cpu_write().

Signed-off-by: Muchun Song <songmuchun@bytedance.com>
---
 kernel/sched/fair.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 870853c47b63c..356660ec4ff3e 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5705,7 +5705,7 @@ static int wake_wide(struct task_struct *p)
 {
 	unsigned int master = current->wakee_flips;
 	unsigned int slave = p->wakee_flips;
-	int factor = this_cpu_read(sd_llc_size);
+	int factor = __this_cpu_read(sd_llc_size);
 
 	if (master < slave)
 		swap(master, slave);
-- 
2.11.0


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

* [tip: sched/core] sched/fair: Use __this_cpu_read() in wake_wide()
  2020-04-21 14:41 [PATCH] sched/fair: Use __this_cpu_read() in wake_wide() Muchun Song
@ 2020-05-01 18:22 ` tip-bot2 for Muchun Song
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Muchun Song @ 2020-05-01 18:22 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Muchun Song, Peter Zijlstra (Intel), x86, LKML

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

Commit-ID:     17c891ab349138e8d8a59ca2700f42ce8af96f4e
Gitweb:        https://git.kernel.org/tip/17c891ab349138e8d8a59ca2700f42ce8af96f4e
Author:        Muchun Song <songmuchun@bytedance.com>
AuthorDate:    Tue, 21 Apr 2020 22:41:23 +08:00
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Thu, 30 Apr 2020 20:14:41 +02:00

sched/fair: Use __this_cpu_read() in wake_wide()

The code is executed with preemption(and interrupts) disabled,
so it's safe to use __this_cpu_write().

Signed-off-by: Muchun Song <songmuchun@bytedance.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200421144123.33580-1-songmuchun@bytedance.com
---
 kernel/sched/fair.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index cd7fd7e..46b7bd4 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5718,7 +5718,7 @@ static int wake_wide(struct task_struct *p)
 {
 	unsigned int master = current->wakee_flips;
 	unsigned int slave = p->wakee_flips;
-	int factor = this_cpu_read(sd_llc_size);
+	int factor = __this_cpu_read(sd_llc_size);
 
 	if (master < slave)
 		swap(master, slave);

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

end of thread, other threads:[~2020-05-01 18:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-21 14:41 [PATCH] sched/fair: Use __this_cpu_read() in wake_wide() Muchun Song
2020-05-01 18:22 ` [tip: sched/core] " tip-bot2 for Muchun Song

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).