From: Jean Pihet <jpihet@mvista.com>
To: Siarhei Siamashka <siarhei.siamashka@nokia.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"linux-arm-kernel@lists.arm.linux.org.uk"
<linux-arm-kernel@lists.arm.linux.org.uk>,
"oprofile-list@lists.sourceforge.net"
<oprofile-list@lists.sourceforge.net>
Subject: Re: get_irq_regs() from soft IRQ
Date: Mon, 29 Jun 2009 20:08:53 +0200 [thread overview]
Message-ID: <200906292008.53409.jpihet@mvista.com> (raw)
In-Reply-To: <200906292054.23783.siarhei.siamashka@nokia.com>
On Monday 29 June 2009 19:54:23 Siarhei Siamashka wrote:
> On Monday 29 June 2009 19:58:41 ext Jean Pihet wrote:
> > Hi Siarhei Siamashka,
> >
> > On Monday 29 June 2009 18:36:57 Siarhei Siamashka wrote:
> > > On Monday 29 June 2009 17:31:18 ext Jean Pihet wrote:
> > > > Hi,
> > > >
> > > > I am trying to get the latest IRQ registers from a timer or a work
> > > > queue but I am running into problems:
> > > > - get_irq_regs() returns NULL in some cases, so it is unsuable and
> > > > even causes crash when trying to get the registers values from the
> > > > returned ptr - I never get user space registers, only kernel
> > > >
> > > > The use case is that the performance unit (PMNC) of the Cortex A8 has
> > > > some serious bug, in short the performance counters overflow IRQ is
> > > > to be avoided. The solution I am implementing is to read and reset
> > > > the counters from a work queue that is triggered by a timer.
> > >
> > > Regarding this oprofile related part. I wonder how you can get oprofile
> > > working properly (providing non-bogus results) without performance
> > > counters overflow IRQ generation?
> > >
> > > Are you trying to implement (in a clean way) something similar to
> > > http://marc.info/?l=oprofile-list&m=123688347009580&w=2
> > >
> > > Or is it going to be a different workaround?
> >
> > I am trying to get a different approach, starting from the errata
> > description. The idea is to avoid the counters from overflowing, which
> > could cause a PMNC unit reset or lock-up (or both).
> >
> > Here are the implementation details:
> > - use a timer to read and reset the counters, then fire a work queue
> > - in the work queue the counters values are converted to oprofile samples
> > - the proper locking is used to avoid some races between the various
> > tasks
> >
> > I am nearly done with it but I am now running into problems with PM
> > (suspend/resume) and get_irq_regs().
> >
> > What do you think?
>
> Russel was the first to reply :)
>
> But we also discussed this "hybrid model" some time ago, and there is a
> clear counterexample where it fails:
> http://www.nabble.com/Re%3A--PATCH-0-1--OMAP-gptimer-based-event-monitor-dr
>iver-for-oprofile-p21374285.html
All right, sorry I was not aware of that discussion. So the PMNC unit is
broken beyond repair. BTW good description and test results!
> > How far are you on your side? Did you stress test the solution? Is the
> > PMNC recovery always successful?
>
> I ended up just using a timer with high frequency of samples generation. it
> works without hassle and is sufficient for the majority of cases.
Ok. It looks like it is the best we can do.
Thanks,
Jean
next prev parent reply other threads:[~2009-06-29 18:09 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-29 14:31 get_irq_regs() from soft IRQ Jean Pihet
2009-06-29 15:19 ` Russell King - ARM Linux
2009-06-29 15:35 ` Jean Pihet
2009-06-29 16:07 ` Russell King - ARM Linux
2009-06-29 16:12 ` Jean Pihet
2009-06-29 16:36 ` Siarhei Siamashka
2009-06-29 16:58 ` Jean Pihet
2009-06-29 17:46 ` Russell King - ARM Linux
2009-06-29 17:57 ` Jean Pihet
2009-06-29 17:54 ` Siarhei Siamashka
2009-06-29 18:08 ` Jean Pihet [this message]
2009-06-29 17:37 ` Russell King - ARM Linux
2009-06-29 17:52 ` Jean Pihet
2009-06-29 18:38 ` Siarhei Siamashka
2009-06-29 18:49 ` Jean Pihet
2009-06-29 19:45 ` Siarhei Siamashka
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=200906292008.53409.jpihet@mvista.com \
--to=jpihet@mvista.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-omap@vger.kernel.org \
--cc=oprofile-list@lists.sourceforge.net \
--cc=siarhei.siamashka@nokia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.