android_kernel_xiaomi_sm8350/include
Christoph Lameter f521089158 [IA64] Spinlock optimizations
1. Nontemporal store for spin unlock.

A nontemporal store will not update the LRU setting for the cacheline. The
cacheline with the lock may therefore be evicted faster from the cpu
caches. Doing so may be useful since it increases the chance that the
exclusive cache line has been evicted when another cpu is trying to
acquire the lock.

The time between dropping and reacquiring a lock on the same cpu is
typically very small so the danger of the cacheline being
evicted is negligible.

2. Avoid semaphore operation in write_unlock and use nontemporal store

write_lock uses a cmpxchg like the regular spin_lock but write_unlock uses
clear_bit which requires a load and then a loop over a cmpxchg. The
following patch makes write_unlock simply use a nontemporal store to clear
the highest 8 bits. We will then still have the lower 3 bytes (24 bits)
left to count the readers.

Doing the byte store will reduce the number of possible readers from 2^31
to 2^24 = 16 million.

These patches were discussed already:

http://marc.theaimsgroup.com/?t=111472054400001&r=1&w=2
http://marc.theaimsgroup.com/?l=linux-ia64&m=111401837707849&w=2

The nontemporal stores will only work using GCC. If a compiler is used
that does not support inline asm then fallback C code is used. This
will preserve the byte store but not be able to do the nontemporal stores.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-08-10 16:13:10 -07:00
..
acpi /home/lenb/src/to-linus branch 'acpi-2.6.12' 2005-07-29 23:31:17 -04:00
asm-alpha [PATCH] pci and yenta: pcibios_bus_to_resource 2005-08-04 21:32:46 -07:00
asm-arm [PATCH] ARM: 2849/1: S3C24XX - USB host update (2848/1) 2005-08-10 16:45:14 +01:00
asm-arm26 [PATCH] Add emergency_restart() 2005-07-26 14:35:41 -07:00
asm-cris [PATCH] CRIS update: new subarchitecture v32 2005-07-27 16:26:01 -07:00
asm-frv [PATCH] Add emergency_restart() 2005-07-26 14:35:41 -07:00
asm-generic [PATCH] pci and yenta: pcibios_bus_to_resource 2005-08-04 21:32:46 -07:00
asm-h8300 [PATCH] Add emergency_restart() 2005-07-26 14:35:41 -07:00
asm-i386 [PATCH] Make visws compile again 2005-08-07 10:00:38 -07:00
asm-ia64 [IA64] Spinlock optimizations 2005-08-10 16:13:10 -07:00
asm-m32r [PATCH] Add emergency_restart() 2005-07-26 14:35:41 -07:00
asm-m68k [PATCH] Add emergency_restart() 2005-07-26 14:35:41 -07:00
asm-m68knommu [PATCH] Add emergency_restart() 2005-07-26 14:35:41 -07:00
asm-mips [PATCH] Add emergency_restart() 2005-07-26 14:35:41 -07:00
asm-parisc [PATCH] pci and yenta: pcibios_bus_to_resource 2005-08-04 21:32:46 -07:00
asm-ppc [PATCH] ppc32: ppc440 pagetable attributes (comments updates) 2005-08-06 09:23:57 -07:00
asm-ppc64 [PATCH] pci and yenta: pcibios_bus_to_resource 2005-08-04 21:32:46 -07:00
asm-s390 [PATCH] s390: ioprio & inotify system calls. 2005-08-01 21:37:59 -07:00
asm-sh [PATCH] Add emergency_restart() 2005-07-26 14:35:41 -07:00
asm-sh64 [PATCH] Add emergency_restart() 2005-07-26 14:35:41 -07:00
asm-sparc [SPARC]: Add inotify syscall entries. 2005-07-27 14:14:39 -07:00
asm-sparc64 [SPARC]: Add inotify syscall entries. 2005-07-27 14:14:39 -07:00
asm-um [PATCH] uml: vm86 compile fix 2005-07-28 21:46:03 -07:00
asm-v850 [PATCH] v850: Define L1_CACHE_SHIFT and L1_CACHE_SHIFT_MAX 2005-07-27 16:26:03 -07:00
asm-x86_64 [PATCH] increase PCIBIOS_MIN_IO on x86 2005-08-02 18:21:25 -07:00
asm-xtensa [PATCH] Add emergency_restart() 2005-07-26 14:35:41 -07:00
linux [PATCH] Fix ide-disk.c oops caused by hwif == NULL 2005-08-09 20:21:31 -07:00
math-emu
media [PATCH] V4L: Miscellaneous fixes 2005-08-01 19:13:59 -07:00
mtd
net [Bluetooth] Remove unused functions and cleanup symbol exports 2005-08-06 12:36:51 +02:00
pcmcia [PATCH] pcmcia: fix pcmcia-cs compilation 2005-07-12 16:00:59 -07:00
rxrpc
scsi [SCSI] fix target scanning oops with fc transport class 2005-08-08 17:14:55 -05:00
sound [ALSA] version 1.0.9b 2005-07-28 15:50:42 +02:00
video