From: Wanpeng Li <kernellwp@gmail.com>
To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>, Mike Galbraith <efault@gmx.de>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Paolo Bonzini <pbonzini@redhat.com>,
Borislav Petkov <bp@alien8.de>,
Wanpeng Li <wanpeng.li@hotmail.com>
Subject: [PATCH v8 0/2] x86/apic: x2apic write eoi msr notrace
Date: Mon, 7 Nov 2016 11:13:38 +0800 [thread overview]
Message-ID: <1478488420-5982-1-git-send-email-wanpeng.li@hotmail.com> (raw)
RCU used illegally from idle CPU!
rcu_scheduler_active = 1, debug_locks = 0
RCU used illegally from extended quiescent state!
no locks held by swapper/1/0.
do_trace_write_msr
native_write_msr
native_apic_msr_eoi_write
smp_reschedule_interrupt
reschedule_interrupt
Reschedule interrupt may be called in CPU idle state. This causes lockdep
check warning above.
As Peterz pointed out:
| The thing is, many many smp_reschedule_interrupt() invocations don't
| actually execute anything much at all and are only sent to tickle the
| return to user path (which does the actual preemption).
|
| Having to do the whole irq_enter/irq_exit dance just for this unlikely
| debug case totally blows.
This patchset adds x2apic write eoi msr notrace to avoid the debug codes
splash and reverts irq_enter/irq_exit dance to avoid to make a very frequent
interrupt slower because of debug code.
v7 -> v8:
* cleanup patch 2/2 descriptions
v6 -> v7:
* cleanup storage class should be at the beginning of the declaration
v5 -> v6:
* split the patch
* don't duplicate the inline asm
v4 -> v5:
* add notrace mark
v3 -> v4:
* add notrace mark
v2 -> v3:
* revert irq_enter/irq_exit() since it is merged
v1 -> v2:
* add write msr notrace to avoid debug codes splash instead of slowdown
a very frequent interrupt
Wanpeng Li (2):
x86/msr: Add write msr notrace
x86/apic: x2apic write eoi msr notrace
arch/x86/include/asm/apic.h | 3 ++-
arch/x86/include/asm/msr.h | 14 +++++++++++++-
arch/x86/kernel/apic/apic.c | 1 +
arch/x86/kernel/kvm.c | 4 ++--
arch/x86/kernel/smp.c | 2 --
5 files changed, 18 insertions(+), 6 deletions(-)
--
1.9.1
next reply other threads:[~2016-11-07 3:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-07 3:13 Wanpeng Li [this message]
2016-11-07 3:13 ` [PATCH v8 1/2] x86/msr: Add write msr notrace Wanpeng Li
2016-11-07 3:13 ` [PATCH v8 2/2] x86/apic: x2apic write eoi " Wanpeng Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1478488420-5982-1-git-send-email-wanpeng.li@hotmail.com \
--to=kernellwp@gmail.com \
--cc=bp@alien8.de \
--cc=efault@gmx.de \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=wanpeng.li@hotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).