diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2018-07-06 16:06:15 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-07-16 01:16:29 +0300 |
commit | af0fffd9300b97d8875aa745bc78e2f6fdb3c1f0 (patch) | |
tree | cea49fd154fce8fb2b34bc06349950dcc40fe302 /net/ipv6/ip6_gre.c | |
parent | 45f5519ec55e75af3565dd737586d3b041834f71 (diff) | |
download | linux-af0fffd9300b97d8875aa745bc78e2f6fdb3c1f0.tar.xz |
sched/core: Remove get_cpu() from sched_fork()
get_cpu() disables preemption for the entire sched_fork() function.
This get_cpu() was introduced in commit:
dd41f596cda0 ("sched: cfs core code")
... which also invoked sched_balance_self() and this function
required preemption do be off.
Today, sched_balance_self() seems to be moved to ->task_fork callback
which is invoked while the ->pi_lock is held.
set_load_weight() could invoke reweight_task() which then via $callchain
might end up in smp_processor_id() but since `update_load' is false
this won't happen.
I didn't find any this_cpu*() or similar usage during the initialisation
of the task_struct.
The `cpu' value (from get_cpu()) is only used later in __set_task_cpu()
while the ->pi_lock lock is held.
Based on this it is possible to remove get_cpu() and use
smp_processor_id() for the `cpu' variable without breaking anything.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20180706130615.g2ex2kmfu5kcvlq6@linutronix.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/ipv6/ip6_gre.c')
0 files changed, 0 insertions, 0 deletions