diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2021-09-28 14:24:32 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2021-10-05 15:52:09 +0200 |
commit | 8d491de6edc27138806cae6e8eca455beb325b62 (patch) | |
tree | 63a9b2be7c7f2baacc8dfd695088634fd1c8d079 /kernel | |
parent | sched: Make cookie functions static (diff) | |
download | linux-8d491de6edc27138806cae6e8eca455beb325b62.tar.xz linux-8d491de6edc27138806cae6e8eca455beb325b62.zip |
sched: Move mmdrop to RCU on RT
mmdrop() is invoked from finish_task_switch() by the incoming task to drop
the mm which was handed over by the previous task. mmdrop() can be quite
expensive which prevents an incoming real-time task from getting useful
work done.
Provide mmdrop_sched() which maps to mmdrop() on !RT kernels. On RT kernels
it delagates the eventually required invocation of __mmdrop() to RCU.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20210928122411.648582026@linutronix.de
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 95f4e16f98a2..9eaeba671001 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -4836,7 +4836,7 @@ static struct rq *finish_task_switch(struct task_struct *prev) */ if (mm) { membarrier_mm_sync_core_before_usermode(mm); - mmdrop(mm); + mmdrop_sched(mm); } if (unlikely(prev_state == TASK_DEAD)) { if (prev->sched_class->task_dead) |