mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Noonan <steven@uplinklabs.net>
To: Lin Ming <mlin@ss.pku.edu.cn>
Cc: linux-kernel@vger.kernel.org,
	Jeremy Fitzhardinge <jeremy@goop.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Marcus Granado <marcus.granado@citrix.com>,
	xen-devel@lists.xen.org, Ben Guthro <ben@guthro.net>
Subject: Re: [PATCH 0/2] fix "perf top" soft lockups under Xen
Date: Wed, 18 Apr 2012 23:47:51 -0700	[thread overview]
Message-ID: <20120419064751.GA6268@asmodeus.uplinklabs.net> (raw)
In-Reply-To: <CAF1ivSZqe54_gAQNZW_teiApObkXsC5iu04Siy1OEnm9M9AcUA@mail.gmail.com>

On Sun, Apr 15, 2012 at 02:14:57PM +0800, Lin Ming wrote:
> (Forgot mail subject, add it)
> 
> On Sun, Apr 15, 2012 at 2:09 PM, Lin Ming <mlin@ss.pku.edu.cn> wrote:
> > Hi all,
> >
> > These 2 patches try to fix the "perf top" soft lockups under Xen
> > reported by Steven at: https://lkml.org/lkml/2012/2/9/506
> >
> > I tested it with 3.4-rc2 and "perf top" works well now.
> >
> > Steven,
> > Could you please help to test it too?
> >
> > The soft lockup code path is:
> >
> > __irq_work_queue
> >  arch_irq_work_raise
> >    apic->send_IPI_self(IRQ_WORK_VECTOR);
> >      apic_send_IPI_self
> >        __default_send_IPI_shortcut
> >          __xapic_wait_icr_idle
> >
> > static inline void __xapic_wait_icr_idle(void)
> > {
> >        while (native_apic_mem_read(APIC_ICR) & APIC_ICR_BUSY)
> >                cpu_relax();
> > }
> >
> > The lockup happens at above while looop.
> >
> > The cause is that Xen has not implemented the APIC IPI interface yet.
> > Xen has IPI interface: xen_send_IPI_one, but it's only used in
> > xen_smp_send_reschedule, xen_smp_send_call_function_ipi and
> > xen_smp_send_call_function_single_ipi, etc.
> >
> > So we need to implement Xen's APIC IPI interface as Ben's patch does.
> > And implement Xen's IRQ_WORK_VECTOR handler.
> >
> > Ben Guthro (1):
> >      xen: implement apic ipi interface
> >
> > Lin Ming (1):
> >      xen: implement IRQ_WORK_VECTOR handler
> >
> >  arch/x86/include/asm/xen/events.h |    1 +
> >  arch/x86/xen/enlighten.c          |    7 ++
> >  arch/x86/xen/smp.c                |  111 +++++++++++++++++++++++++++++++++++-
> >  arch/x86/xen/smp.h                |   12 ++++
> >  4 files changed, 127 insertions(+), 4 deletions(-)
> >
> > Any comment is appreciated.
> > Lin Ming

OK, finally got around to testing this. Sorry about the delay, been
rather busy at work.

These two patches definitely fix the lockups, but 'perf test' doesn't
pass every test:

	 1: vmlinux symtab matches kallsyms:
	--- start ---
	Looking at the vmlinux_path (6 entries long)
	dso__load_sym: cannot get elf header.
	Using /lib/modules/3.3.2-00002-gf57130d/build/vmlinux for symbols
	Maps only in vmlinux:
	 ffffffff81ae61b1-ffffffff81b9d7b7 0 [kernel].init.text
	 ffffffff81b9d7b8-ffffffff9fffffff 0 [kernel].exit.text
	Maps in vmlinux with a different name in kallsyms:
	Maps only in kallsyms:
	---- end ----
	vmlinux symtab matches kallsyms: Ok
	 2: detect open syscall event:
	--- start ---
	---- end ----
	detect open syscall event: Ok
	 3: detect open syscall event on all cpus:
	--- start ---
	---- end ----
	detect open syscall event on all cpus: Ok
	 4: read samples using the mmap interface:
	--- start ---
	---- end ----
	read samples using the mmap interface: Ok
	 5: parse events tests:
	--- start ---
	---- end ----
	parse events tests: Ok
	 6: Validate PERF_RECORD_* events & perf_sample fields:
	--- start ---
	perf_evlist__open: Bad file descriptor
	---- end ----
	Validate PERF_RECORD_* events & perf_sample fields: FAILED!

I couldn't figure out what exactly was failing in that test with a
quick inspection... Someone else want to take a stab at it? If someone
wants to give me patches that add extra output, I could run those too.

Anyway:

Tested-by: Steven Noonan <steven@uplinklabs.net>

- Steven

  reply	other threads:[~2012-04-19  6:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-15  6:14 Lin Ming
2012-04-19  6:47 ` Steven Noonan [this message]
2012-04-19  7:00   ` Lin Ming

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=20120419064751.GA6268@asmodeus.uplinklabs.net \
    --to=steven@uplinklabs.net \
    --cc=a.p.zijlstra@chello.nl \
    --cc=ben@guthro.net \
    --cc=jeremy@goop.org \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcus.granado@citrix.com \
    --cc=mlin@ss.pku.edu.cn \
    --cc=xen-devel@lists.xen.org \
    /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

all inboxes | Powered by JetHome®