1
0
Fork 0
alistair23-linux/include
Waiman Long 8ca2b56cd7 locking/lockdep: Make class->ops a percpu counter and move it under CONFIG_DEBUG_LOCKDEP=y
A sizable portion of the CPU cycles spent on the __lock_acquire() is used
up by the atomic increment of the class->ops stat counter. By taking it out
from the lock_class structure and changing it to a per-cpu per-lock-class
counter, we can reduce the amount of cacheline contention on the class
structure when multiple CPUs are trying to acquire locks of the same
class simultaneously.

To limit the increase in memory consumption because of the percpu nature
of that counter, it is now put back under the CONFIG_DEBUG_LOCKDEP
config option. So the memory consumption increase will only occur if
CONFIG_DEBUG_LOCKDEP is defined. The lock_class structure, however,
is reduced in size by 16 bytes on 64-bit archs after ops removal and
a minor restructuring of the fields.

This patch also fixes a bug in the increment code as the counter is of
the 'unsigned long' type, but atomic_inc() was used to increment it.

Signed-off-by: Waiman Long <longman@redhat.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
Link: http://lkml.kernel.org/r/d66681f3-8781-9793-1dcf-2436a284550b@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2018-10-09 09:56:33 +02:00
..
acpi ACPICA: Update version to 20180810 2018-08-14 23:49:13 +02:00
asm-generic locking/spinlocks: Remove an instruction from spin and write locks 2018-10-02 09:49:42 +02:00
clocksource
crypto crypto: scatterwalk - remove scatterwalk_samebuf() 2018-08-03 18:06:04 +08:00
drm drm pull for 4.19-rc1 2018-08-15 17:39:07 -07:00
dt-bindings ARM: SoC: late updates 2018-08-25 14:12:36 -07:00
keys
kvm KVM: arm/arm64: vgic-v3: Add core support for Group0 SGIs 2018-08-12 12:06:34 +01:00
linux locking/lockdep: Make class->ops a percpu counter and move it under CONFIG_DEBUG_LOCKDEP=y 2018-10-09 09:56:33 +02:00
math-emu
media - New Drivers 2018-08-20 15:38:44 -07:00
memory
misc
net Here are quite a large number of fixes, notably: 2018-09-03 22:12:02 -07:00
pcmcia pcmcia: remove long deprecated pcmcia_request_exclusive_irq() function 2018-08-18 12:30:42 -07:00
ras
rdma Second merge window update 2018-08-23 15:34:48 -07:00
scsi SCSI misc on 20180815 2018-08-15 22:06:26 -07:00
soc Various updates to soc/fsl for 4.19 2018-07-26 00:12:56 -07:00
sound ASoC: Updates for v4.19 2018-08-13 12:12:31 +02:00
target scsi: target: add session removal function 2018-08-02 15:29:31 -04:00
trace Merge branch 'for-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup 2018-08-24 13:19:27 -07:00
uapi Merge branch 'akpm' (patches from Andrew) 2018-09-04 17:01:11 -07:00
video fbdev changes for v4.19: 2018-08-23 15:44:58 -07:00
xen Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2018-08-18 16:48:07 -07:00