[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANRm+CysHyBcGHY3OT=Q1EFEKo5GpDS__Qd8vn=3ERM-OxntHw@mail.gmail.com>
Date: Thu, 13 Oct 2016 20:19:32 +0800
From: Wanpeng Li <kernellwp@...il.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Peter Zijlstra <peterz@...radead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Wanpeng Li <wanpeng.li@...mail.com>
Subject: Re: [PATCH] x86/apic: Fix suspicious RCU usage in smp_trace_call_function_interrupt
2016-10-12 21:17 GMT+08:00 Thomas Gleixner <tglx@...utronix.de>:
> On Wed, 12 Oct 2016, Wanpeng Li wrote:
>> irq_enter() which is called in scheduler_ipi() is too late to tell RCU
>> susbstems to end the extended quiescent state before ack_APIC_irq(),
>> any ideas?
>
> You can call irq_enter/exit() in __smp_reschedule_interrupt(). It can be
> called nested.
In smp_reschedule_interrupt()? Do you mean something like this?
diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c
index 658777c..ac2ee87 100644
--- a/arch/x86/kernel/smp.c
+++ b/arch/x86/kernel/smp.c
@@ -259,8 +259,10 @@ static inline void __smp_reschedule_interrupt(void)
__visible void smp_reschedule_interrupt(struct pt_regs *regs)
{
+ irq_enter();
ack_APIC_irq();
__smp_reschedule_interrupt();
+ irq_exit();
/*
* KVM uses this interrupt to force a cpu out of guest mode
*/
Powered by blists - more mailing lists