Date: Mon, 17 Sep 2018 11:51:38 +0200 From: Julian Stecklina <jsteckli@...zon.de> To: Khalid Aziz <khalid.aziz@...cle.com> Cc: Linus Torvalds <torvalds@...ux-foundation.org>, David Woodhouse <dwmw@...zon.co.uk>, Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>, juerg.haefliger@....com, deepa.srinivasan@...cle.com, Jim Mattson <jmattson@...gle.com>, Andrew Cooper <andrew.cooper3@...rix.com>, Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, Boris Ostrovsky <boris.ostrovsky@...cle.com>, linux-mm <linux-mm@...ck.org>, Thomas Gleixner <tglx@...utronix.de>, joao.m.martins@...cle.com, pradeep.vincent@...cle.com, Andi Kleen <ak@...ux.intel.com>, kanth.ghatraju@...cle.com, Liran Alon <liran.alon@...cle.com>, Kees Cook <keescook@...gle.com>, Kernel Hardening <kernel-hardening@...ts.openwall.com>, chris.hyser@...cle.com, Tyler Hicks <tyhicks@...onical.com>, John Haxby <john.haxby@...cle.com>, Jon Masters <jcm@...hat.com> Subject: Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU) Khalid Aziz <khalid.aziz@...cle.com> 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. 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  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
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.