[2.4] [PATCH] hash_page rework, take 2

Olof Johansson olof at austin.ibm.com
Fri Jan 23 08:45:05 EST 2004

Ok, so the previous approach of the hash_page rework had a few drawbacks
as pointed out by Ben and others. Here's a new try, I'm looking for any
feedback I can get on it!

The IPI approach ended up causing a whole lot of interrupts, so I went
with a rwlock per CPU instead. hash_page() takes the lock in read mode,
so all the deallocation code needs to do is make sure it could take all
locks for writing. Once it's been able to do so it's guaranteed that no
readers are holding on to references to a PTE about to be deallocated.

While I was at it, I switched over to the per-HPTE locking that 2.6 uses.

I've been kicking this around quite a bit in the specweb setup, and it's
been running fine. I didn't see any obvious contention for any of the
structures on an 8-way machine, so I didn't pursure further enhancements
by aligning stuff on cache lines. This is, after all, not 2.6. :-)



Olof Johansson                                        Office: 4F005/905
pSeries Linux Development                             IBM Systems Group
Email: olof at austin.ibm.com                          Phone: 512-838-9858
All opinions are my own and not those of IBM

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/

More information about the Linuxppc64-dev mailing list