original_kernel/drivers
Tejun Heo 2aad2a86f6 percpu_ref: add PERCPU_REF_INIT_* flags
With the recent addition of percpu_ref_reinit(), percpu_ref now can be
used as a persistent switch which can be turned on and off repeatedly
where turning off maps to killing the ref and waiting for it to drain;
however, there currently isn't a way to initialize a percpu_ref in its
off (killed and drained) state, which can be inconvenient for certain
persistent switch use cases.

Similarly, percpu_ref_switch_to_atomic/percpu() allow dynamic
selection of operation mode; however, currently a newly initialized
percpu_ref is always in percpu mode making it impossible to avoid the
latency overhead of switching to atomic mode.

This patch adds @flags to percpu_ref_init() and implements the
following flags.

* PERCPU_REF_INIT_ATOMIC	: start ref in atomic mode
* PERCPU_REF_INIT_DEAD		: start ref killed and drained

These flags should be able to serve the above two use cases.

v2: target_core_tpg.c conversion was missing.  Fixed.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Kent Overstreet <kmo@daterainc.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
2014-09-24 13:31:50 -04:00
..
accessibility
acpi PCI updates for v3.17: 2014-09-19 10:50:30 -07:00
amba
ata ahci_xgene: Fix the link down in first attempt for the APM X-Gene SoC AHCI SATA host controller driver. 2014-09-06 11:27:15 +09:00
atm
auxdisplay
base regmap: Fix registers file debugfs 2014-09-15 16:20:56 -07:00
bcma
block Merge branch 'for-linus' of git://git.kernel.dk/linux-block 2014-09-13 09:39:55 -07:00
bluetooth
bus bus: arm-ccn: Move event cleanup routine 2014-09-05 13:25:01 -07:00
cdrom
char virtio-rng: skip reading when we start to remove the device 2014-09-11 22:28:38 +09:30
clk clk/efm32gg: fix dt init prototype 2014-09-09 13:52:18 -07:00
clocksource
connector
cpufreq cpufreq / OPP: Fix the order of arguments for kcalloc() 2014-09-08 00:02:58 +02:00
cpuidle
crypto
dca
devfreq
dio
dma dmaengine: jz4740: Fix non-cyclic descriptor completion 2014-09-11 10:54:25 +05:30
dma-buf
edac
eisa
extcon
firewire
firmware efi/arm64: Fix fdt-related memory reservation 2014-09-09 07:51:09 +01:00
fmc
gpio
gpu Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux 2014-09-20 10:10:14 -07:00
hid
hsi
hv
hwmon hwmon: (tmp103) Fix resource leak bug in tmp103 temperature sensor driver 2014-09-22 11:11:48 -07:00
hwspinlock
i2c
ide
idle
iio iio:magnetometer: bugfix magnetometers gain values 2014-09-14 18:21:23 +01:00
infiniband Last late set of InfiniBand/RDMA fixes for 3.17: 2014-09-23 16:47:34 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2014-09-15 15:12:01 -07:00
iommu iommu/fsl: Fix warning resulting from adding PCI device twice 2014-09-05 16:01:46 +02:00
ipack
irqchip
isdn
leds
lguest
macintosh
mailbox
mcb
md dm cache: fix race causing dirty blocks to be marked as clean 2014-09-10 11:20:47 -04:00
media
memory
memstick
message scsi: use 'depends' instead of 'select' for SCSI_FC_ATTRS 2014-09-16 16:55:55 -04:00
mfd
misc Lattice ECP3 FPGA: Check firmware pointer 2014-09-08 14:38:14 -07:00
mmc
mtd Two trivial MTD updates for 3.17-rc4: 2014-09-06 12:12:09 -07:00
net Last late set of InfiniBand/RDMA fixes for 3.17: 2014-09-23 16:47:34 -07:00
nfc
ntb ntb: Add alignment check to meet hardware requirement 2014-09-14 00:10:38 -04:00
nubus
of
oprofile
parisc parisc: pdc_stable.c: Avoid potential stack overflows 2014-09-21 22:31:08 +02:00
parport
pci PCI updates for v3.17: 2014-09-19 10:50:30 -07:00
pcmcia
phy phy: spear1340-miphy: fix driver dependencies 2014-09-12 11:35:31 +05:30
pinctrl pinctrl: baytrail: resolve unbalanced IRQ wake disable warning 2014-09-10 14:25:51 +02:00
platform
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator regulator: remove unnecessary of_node_get() to parent 2014-09-10 11:35:02 +01:00
remoteproc
reset
rpmsg
rtc
s390 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2014-09-08 08:27:00 -07:00
sbus
scsi Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-09-22 18:23:33 -07:00
sfi
sh
sn
soc
spi Merge remote-tracking branches 'spi/fix/davinci', 'spi/fix/dw', 'spi/fix/fsl', 'spi/fix/pl022', 'spi/fix/rockchip' and 'spi/fix/sirf' into spi-linus 2014-09-16 16:20:19 -07:00
spmi
ssb
staging staging: vt6655: buffer overflow in ioctl 2014-09-19 15:32:20 -07:00
target percpu_ref: add PERCPU_REF_INIT_* flags 2014-09-24 13:31:50 -04:00
tc
thermal
thunderbolt
tty tty: xuartps: Fix tx_emtpy() callback 2014-09-08 16:33:56 -07:00
uio
usb USB: storage: Add quirks for Entrega/Xircom USB to SCSI converters 2014-09-19 15:01:38 -07:00
uwb uwb: init beacon cache entry before registering uwb device 2014-09-08 16:03:21 -07:00
vfio
vhost
video video: ARM CLCD: Fix color model capabilities for DT platforms 2014-09-12 11:45:10 +03:00
virt
virtio
vlynq
vme
w1
watchdog
xen xen: bug fixes for 3.17-rc4 2014-09-11 16:52:29 -07:00
zorro
Kconfig
Makefile