2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-11 23:23:52 +08:00
linux-next/drivers/staging
Dmitry Eremin 47a57bde2a staging/lustre/clio: replace semaphore with mutex
According https://www.kernel.org/doc/Documentation/mutex-design.txt:
- the mutex subsystem is slightly faster and has better scalability
  for contended workloads. In terms of 'ops per CPU cycle', the
  semaphore kernel performed 551 ops/sec per 1% of CPU time used,
  while the mutex kernel performed 3825 ops/sec per 1% of CPU time
  used - it was 6.9 times more efficient.
- there are no fastpath tradeoffs, the mutex fastpath is just as
  tight as the semaphore fastpath. On x86, the locking fastpath is
  2 instructions.
- 'struct mutex' semantics are well-defined and are enforced if
  CONFIG_DEBUG_MUTEXES is turned on. Semaphores on the other hand
  have virtually no debugging code or instrumentation.

One more benefit of mutex is optimistic spinning. It try to spin for
acquisition when there are no pending waiters and the lock owner is
currently running on a (different) CPU. The rationale is that if the
lock owner is running, it is likely to release the lock soon.

This significantly reduce amount of context switches when locked
region is small and we have high contention.
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: http://review.whamcloud.com/9095
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4257
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-27 10:30:59 -07:00
..
android Staging: android: ion: duplicated clearing of sg_table 2014-04-25 15:17:31 -07:00
bcm Staging:bcm: Fixes coding style issues in drivers/staging/bcm/Qos.c 2014-04-18 16:23:55 -07:00
ced1401 Staging: ced1401: Fix no new typedef warning in ced_ioctl.h 2014-03-18 13:30:44 -07:00
comedi staging: comedi: adv_pci1710: rename check_channel_list() 2014-04-25 15:07:40 -07:00
cptm1217
crystalhd Staging: crystalhd: Improve kzalloc calls in crystalhd_lnx.c 2014-04-18 16:22:15 -07:00
cxt1e1 staging: cxt1e1: Avoid using 0 instead of NULL 2014-04-26 08:42:54 -07:00
dgap staging: dgap: remove uchar typedef and replace use with u8 2014-04-14 21:20:56 -07:00
dgnc staging:dgnc: Removed assignments from if statements. 2014-03-17 16:42:47 -07:00
dgrp drivers/staging/dgrp:dgrp_tty.c: Fix line over 80 characters. 2014-03-18 10:53:21 -07:00
et131x Staging: et131x: Fix warning of prefer ether_addr_copy() in et131x.c 2014-03-08 20:27:48 -08:00
frontier Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2014-04-02 16:23:38 -07:00
ft1000 staging: ft1000: Fix line over 80 characters. 2014-03-19 13:41:28 -07:00
fwserial drivers/staging: Use RCU_INIT_POINTER(x, NULL) in fwserial/fwserial.c 2014-04-25 14:01:40 -07:00
gdm72xx staging: gdm72xx: remove completed TODO item 2014-03-16 19:53:58 -07:00
gdm724x Staging: gdm724x: Fix unchecked sscanf values in gdm_lte.c 2014-03-18 11:35:53 -07:00
goldfish Merge 3.15-rc2 into staging-next 2014-04-22 10:08:40 -07:00
gs_fpgaboot staging: gs_fpgaboot: remove __TIMESTAMP__ macro 2014-04-15 14:46:43 -07:00
iio First round of IIO new driver, functionality and cleanups for the 3.16 cycle. 2014-04-26 08:12:25 -07:00
imx-drm Staging: imx-drm: Fix some lines over 80 characters 2014-04-25 16:14:56 -07:00
keucr staging: keucr: fix sparse warning 2014-04-25 15:22:57 -07:00
line6 staging/line6: Fix kzalloc coding style issue 2014-04-16 20:30:04 -07:00
lustre staging/lustre/clio: replace semaphore with mutex 2014-04-27 10:30:59 -07:00
media [media] msi3101: check I/O return values on stop streaming 2014-04-06 11:08:19 -03:00
mt29f_spinand
netlogic staging: netlogic: fix missing a blank line after declarations 2014-04-25 16:05:12 -07:00
nokia_h4p staging: nokia_h4p: Fix quoted string split across lines 2014-03-19 13:50:23 -07:00
nvec staging:nvec: Introduce the use of the managed version of kzalloc 2014-03-07 15:19:36 -08:00
octeon Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-04-02 20:53:45 -07:00
octeon-usb staging: octeon-usb: prevent memory corruption 2014-03-20 01:51:12 +00:00
olpc_dcon
ozwpan staging:ozwpan:Fix sparse warning of cast to restricted __le16 2014-03-18 11:58:45 -07:00
panel staging: panel: add blank lines after declarations 2014-04-18 16:17:12 -07:00
phison
quickstart
rtl8188eu staging: rtl8188eu: Remove unused enum LED_CTL_MODE members. 2014-04-25 15:59:51 -07:00
rtl8192e Staging: rtl8192e: Remove built-in firmware images 2014-04-25 16:02:01 -07:00
rtl8192u staging: rtl8192u: Fix indentation problems 2014-04-25 15:37:55 -07:00
rtl8712 staging: r8712u: Fix case where ethtype was never obtained and always be checked against 0 2014-04-16 13:07:19 -07:00
rtl8723au staging: rtl8723au: Get rid of _rtw_free_network23a_nolock23a() 2014-04-26 10:16:22 -07:00
rtl8821ae staging/rtl8821ae: fix sparse address space warning 2014-04-25 16:02:01 -07:00
rts5139 staging: rts5139: Added in sd_cprm.c an include to fix a sparse warning 2014-03-16 17:41:13 -07:00
rts5208 staging: rts5208: Fix line over 80 characters. 2014-03-18 11:56:51 -07:00
sep staging: sep: Add fallthrough comment 2014-03-16 17:52:00 -07:00
serqt_usb2 drivers/staging/serqt_usb2:serqt_usb2.c Fix line over 80 characters. 2014-03-18 11:18:05 -07:00
silicom staging: silicom: remove redundant pci_get_drvdata() call 2014-04-25 15:34:16 -07:00
skein staging: crypto: skein: add TODO file 2014-04-18 15:47:43 -07:00
slicoss Staging: slicoss: Fix smatch warning in slicoss.c 2014-04-25 16:05:12 -07:00
speakup Merge 3.15-rc2 into staging-next 2014-04-22 10:08:40 -07:00
ste_rmi4
tidspbridge staging/tidspbridge/rmgr/mgr.c Fix quoted string split across lines 2014-03-19 09:27:39 -07:00
unisys Staging: unisys: virthba: add MODULE_DEVICE_TABLE 2014-04-25 15:32:17 -07:00
usbip staging/usbip: fix store_attach() sscanf return value check 2014-04-15 14:43:01 -07:00
vme Merge 3.15-rc2 into staging-next 2014-04-22 10:08:40 -07:00
vt6655 staging: vt6655: removed incorrect casting in ioctl.c 2014-04-18 16:11:56 -07:00
vt6656 staging: vt6656: fix bad symbol declaration 2014-04-18 16:10:29 -07:00
winbond staging: winbond: Fix line over 80 characters. 2014-03-19 09:27:39 -07:00
wlags49_h2 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-04-02 20:53:45 -07:00
wlags49_h25
wlan-ng staging/wlan-ng: fix small coding style issues 2014-04-25 16:21:15 -07:00
xgifb staging: xgifb coding style cleanup 2014-04-25 16:20:02 -07:00
xillybus staging: xillybus: XILLYBUS_PCIE depends on PCI_MSI 2014-03-21 12:24:09 -07:00
Kconfig staging: remove sbe-2t3e3 driver. 2014-04-25 13:59:57 -07:00
Makefile staging: remove sbe-2t3e3 driver. 2014-04-25 13:59:57 -07:00
staging.c