On Tue, Mar 10, 2015 at 11:15:18AM +1100, Michael Ellerman wrote: > On Mon, 2015-03-09 at 17:53 +1100, Benjamin Herrenschmidt wrote: > > On Sat, 2015-03-07 at 19:19 +0800, Kevin Hao wrote: > > > It makes no sense to use a variant lock token on a platform which > > > doesn't support for shared-processor logical partitions. Actually we > > > can eliminate a memory load by using a fixed lock token on these > > > platforms. > > > > Does this provide an actual measurable benefit ? I found that the lock > > token was quite handy for debugging ... > > Yeah. It can be very useful to know which cpu holds a lock when you get into a > dead lock. > > Unless you can show this is a performance boost I'm inclined to leave it > as-is.
I am not sure if there is more suitable benchmark for spinlock. I tried the perf locking benchmark got from here [1]. The test was running on a t4240rdb board with xfs rootfs. I have run the following commands four times before and after applying this patch. ./perf record ./perf bench locking vfs; ./perf report Before: 3.06% locking-vfs [kernel.kallsyms] [k] ._raw_spin_lock 3.04% locking-vfs [kernel.kallsyms] [k] ._raw_spin_lock 3.03% locking-vfs [kernel.kallsyms] [k] ._raw_spin_lock 3.00% locking-vfs [kernel.kallsyms] [k] ._raw_spin_lock After: 3.05% locking-vfs [kernel.kallsyms] [k] ._raw_spin_lock 2.97% locking-vfs [kernel.kallsyms] [k] ._raw_spin_lock 2.96% locking-vfs [kernel.kallsyms] [k] ._raw_spin_lock 2.97% locking-vfs [kernel.kallsyms] [k] ._raw_spin_lock [1] http://lkml.iu.edu/hypermail/linux/kernel/1412.1/01419.html Thanks, Kevin
pgpsAPyXngmuG.pgp
Description: PGP signature
_______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev