Re: [PATCH] parisc: use per-pagetable spinlock

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

 



On Sat, 2019-04-06 at 16:13 -0400, Mikulas Patocka wrote:
> 
> On Sat, 6 Apr 2019, James Bottomley wrote:
> 
> > On Sat, 2019-04-06 at 15:36 -0400, Mikulas Patocka wrote:
> > > Parisc uses a global spinlock to protect pagetable updates in the
> TLB
> > > fault handlers. When multiple cores are taking TLB faults
> > > simultaneously, the cache line containing the spinlock becomes a
> > > bottleneck.
> > 
> > You can't do this.  As the comment in cache.c says: the lock is to
> > protect the merced bus, which runs between the CPUs on some
> systems. 
> > That means it must be a single, global lock.
> 
> So - how could we detect if the Merced bus is present?

My best recollection is that it's only N class systems.

> > Of course, on systems without a merced bus, we don't need the lock
> at 
> > all, so runtime patching might be usable to fix that case.
> > 
> > James
> 
> The lock is still needed to synchronize TLB fault handlers with the
> code that modifies the pagetables - but we could have per-process
> lock for this purpose.

It is?  I don't think we need any per-arch sync for that.  The purge
should happen after all modifications are done so the next page fault
inserts the new TLB entry ... so if there is a place where the purge
lock matters to the page table updates, we're doing something wrong.

James




[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux