]> git.baikalelectronics.ru Git - kernel.git/commit
s390/bitops: implement cache friendly test_and_set_bit_lock
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 20 Aug 2015 10:57:33 +0000 (12:57 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 14 Oct 2015 12:32:06 +0000 (14:32 +0200)
commitcb2ab70c6e290ec3cf9533885524a45b37a92b33
treeb1d501fa146502365256a02ac6aa3352ced890fa
parent97e4989bfbf288d8c80fbbefd06a8eda95bd6f49
s390/bitops: implement cache friendly test_and_set_bit_lock

The generic implementation for test_and_set_bit_lock in include/asm-generic
uses the standard test_and_set_bit operation. This is done with either a
'csg' or a 'loag' instruction. For both version the cache line is fetched
exclusively, even if the bit is already set. The result is an increase in
cache traffic, for a contented lock this is a bad idea.

Acked-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/bitops.h