Re: [PATCH RFC tip/core/rcu 09/16] rcu-tasks: Add an RCU-tasks rude variant

From: Steven Rostedt
Date: Mon May 11 2020 - 12:07:58 EST


On Sun, 10 May 2020 17:59:27 +0800
Lai Jiangshan <jiangshanlai@xxxxxxxxx> wrote:

> I think adding a small number of instructions to preempt_schedule_irq()
> is sufficient to create the needed protected region between the start
> of a function and the trampoline body.
>
> preempt_schedule_irq() {
> + if (unlikely(is_trampoline_page(page_of(interrupted_ip)))) {
> + return; // don't do preempt schedule
> +
> + }
> preempt_schedule_irq() original body
> }

First, this would never be accepted due to the overhead it would cause,
next, the interrupt instruction pointer could be the call to the
trampoline itself. It would be hard to guarantee that we are not on the way
to the trampoline in question.

-- Steve