sched_pin() versus PCPU_GET

Kostik Belousov kostikbel at gmail.com
Thu Aug 5 16:17:41 UTC 2010


On Thu, Aug 05, 2010 at 09:01:22AM -0700, mdf at freebsd.org wrote:
> On Wed, Aug 4, 2010 at 9:20 AM,  <mdf at freebsd.org> wrote:
> > On Wed, Aug 4, 2010 at 2:26 PM, John Baldwin <jhb at freebsd.org> wrote:
> >> Actually, I would beg to differ in that case.  If PCPU_GET(spinlocks)
> >> returns non-NULL, then it means that you hold a spin lock,
> >
> > ll_count is 0 for the "correct" pc_spinlocks and non-zero for the
> > "wrong" one, though.  So I think it can be non-NULL but the current
> > thread/CPU doesn't hold a spinlock.
> >
> > I don't believe we have any code in the NMI handler.  I'm on vacation
> > today so I'll check tomorrow.
> 
> I checked and ipi_nmi_handler() doesn't appear to have any local
> changes.  I assume that's where I should look?

I think that, in case you do not use hwpmc, you could add "iretq"
as the first instruction of the nmi handler in exception.S and see
whether the issue is reproducable.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20100805/12f84bb5/attachment.pgp


More information about the freebsd-hackers mailing list