Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Some alpha problems in current



On Mon, Feb 04, 2008 at 12:57:03PM +0000, Andrew Doran wrote:

> On Sun, Feb 03, 2008 at 03:03:53PM -0700, Michael L. Hitch wrote:
> 
> >   I'm now trying a kernel where I've added a SPINLOCK_SPIN_HOOK in 
> > the places where sys/kern/mutex.c spins, and my MP kernel has been running 
> > for over 2 hours.  I'm going to try a LOCKDEBUG kernel again after a while
> > to see if that's changed by the addition of the SPINLOCK_SPIN_HOOKs.
> 
> Cool. So it seems the pmap locking works :-). Your change has the side
> effect that IPIs will be processed from an interrupt firing above IPL_VM,

It occurred to me we might want to allow that. The only problematic IPI I
can see is the TLB shootdown one, which uses pool_cache. That can't be
accessed above IPL_VM. If we want to allow running the shootdowns at a
higher priority (i.e. from the clock interrupt) one solution would be to
convert the code to use a private, fixed set of TLB shootdown jobs per-CPU
and spinlock that at IPL_HIGH. Other stuff in pmap.c might need adjusting to
block out the clock interrupt, I'm not sure.

There is one problem with the shootdown code worth mentioning. It should
spin in pmap_update() waiting for jobs to complete. Currently this does not
happen and IIRC it's a bit problematic due to IPIs occuring at low priority
(although the SPINLOCK_SPIN_HOOK change may solve that, I can't remember).
Theoretically, there is a possibility that we could run into problems if
another CPU accesses a newly allocated chunk of memory before the
corresponding shootdown IPI arrives.

Thanks,
Andrew



Home | Main Index | Thread Index | Old Index