Khalid Aziz <khalid.aziz@xxxxxxxxxx> writes: > I ran tests with your updated code and gathered lock statistics. Change in > system time for "make -j60" was in the noise margin (It actually went up by > about 2%). There is some contention on xpfo_lock. Average wait time does not > look high compared to other locks. Max hold time looks a little long. From > /proc/lock_stat: > > &(&page->xpfo_lock)->rlock: 29698 29897 0.06 134.39 15345.58 0.51 422474670 960222532 0.05 30362.05 195807002.62 0.20 > > Nevertheless even a smaller average wait time can add up. Thanks for doing this! I've spent some time optimizing spinlock usage in the code. See the two last commits in my xpfo-master branch[1]. The optimization in xpfo_kunmap is pretty safe. The last commit that optimizes locking in xpfo_kmap is tricky, though, and I'm not sure this is the right approach. FWIW, I've modeled this locking strategy in Spin and it doesn't find any problems with it. I've tested the result on a box with 72 hardware threads and I didn't see a meaningful difference in kernel compile performance. It's still hovering around 2%. So the question is, whether it's actually useful to do these optimizations. Khalid, you mentioned 5% overhead. Can you give the new code a spin and see whether anything changes? Julian [1] http://git.infradead.org/users/jsteckli/linux-xpfo.git/shortlog/refs/heads/xpfo-master -- Amazon Development Center Germany GmbH Berlin - Dresden - Aachen main office: Krausenstr. 38, 10117 Berlin Geschaeftsfuehrer: Dr. Ralf Herbrich, Christian Schlaeger Ust-ID: DE289237879 Eingetragen am Amtsgericht Charlottenburg HRB 149173 B