Kirill Tkhai
f0b07bb151
net: Introduce net_rwsem to protect net_namespace_list
...
rtnl_lock() is used everywhere, and contention is very high.
When someone wants to iterate over alive net namespaces,
he/she has no a possibility to do that without exclusive lock.
But the exclusive rtnl_lock() in such places is overkill,
and it just increases the contention. Yes, there is already
for_each_net_rcu() in kernel, but it requires rcu_read_lock(),
and this can't be sleepable. Also, sometimes it may be need
really prevent net_namespace_list growth, so for_each_net_rcu()
is not fit there.
This patch introduces new rw_semaphore, which will be used
instead of rtnl_mutex to protect net_namespace_list. It is
sleepable and allows not-exclusive iterations over net
namespaces list. It allows to stop using rtnl_lock()
in several places (what is made in next patches) and makes
less the time, we keep rtnl_mutex. Here we just add new lock,
while the explanation of we can remove rtnl_lock() there are
in next patches.
Fine grained locks generally are better, then one big lock,
so let's do that with net_namespace_list, while the situation
allows that.
Signed-off-by: Kirill Tkhai <[email protected] >
Signed-off-by: David S. Miller <[email protected] >
2018-03-29 13:47:53 -04:00
..
accessibility
acpi
Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm
2018-03-22 18:37:49 -07:00
amba
android
ata
libata: Modify quirks for MX100 to limit NCQ_TRIM quirk to MU01 version
2018-03-19 08:36:38 -07:00
atm
atm: idt77252: remove redundant bit-wise or'ing of zero
2018-02-23 12:42:26 -05:00
auxdisplay
auxdisplay: img-ascii-lcd: Silence 2 uninitialized warnings
2018-03-13 18:16:38 +01:00
base
bcma
bcma: Prevent build of PCI host features in module
2018-03-13 18:47:47 +02:00
block
loop: Fix lost writes caused by missing flag
2018-03-09 08:36:36 -07:00
bluetooth
wireless-drivers-next patches for 4.17
2018-03-25 21:27:38 -04:00
bus
cdrom
char
tpm: fix potential buffer overruns caused by bit glitches on the bus
2018-02-26 15:43:46 -08:00
clk
clk: bcm2835: Protect sections updating shared registers
2018-03-19 09:27:37 -07:00
clocksource
clocksource/atmel-st: Add 'depends on HAS_IOMEM' to fix unmet dependency
2018-03-09 11:11:58 +01:00
connector
cpufreq
Merge branch 'cpufreq-scpi'
2018-03-02 10:44:44 +01:00
cpuidle
crypto
s390:
2018-02-26 09:28:35 -08:00
dax
dax: ->direct_access does not sleep anymore
2018-02-26 12:32:29 -08:00
dca
devfreq
dio
dma
dmaengine: mv_xor_v2: Fix clock resource by adding a register clock
2018-03-11 20:33:27 +05:30
dma-buf
edac
EDAC, sb_edac: Fix out of bound writes during DIMM configuration on KNL
2018-02-23 12:05:37 +01:00
eisa
extcon
firewire
firmware
Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2018-03-18 11:56:53 -07:00
fmc
fpga
fsi
gpio
gpio: rcar: Use wakeup_path i.s.o. explicit clock handling
2018-03-05 09:01:21 +01:00
gpu
drm/ast: Fixed 1280x800 Display Issue
2018-03-23 09:50:54 +10:00
hid
hsi
hv
hwmon
hwspinlock
hwtracing
i2c
i2c: octeon: Prevent error message on bus error
2018-03-02 11:11:15 +01:00
ide
genhd: Rename get_disk() to get_disk_and_module()
2018-02-26 09:48:42 -07:00
idle
iio
First round of IIO fixes for the 4.16 cycle.
2018-02-20 10:03:22 +01:00
infiniband
net: Introduce net_rwsem to protect net_namespace_list
2018-03-29 13:47:53 -04:00
input
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
2018-03-07 17:37:32 -08:00
iommu
treewide/trivial: Remove ';;$' typo noise
2018-02-22 10:59:33 +01:00
ipack
irqchip
irqchip/irq-imx-gpcv2: Remove unused function
2018-03-11 13:27:12 +00:00
isdn
leds
lightnvm
macintosh
mailbox
mcb
md
dm mpath: fix passing integrity data
2018-03-14 15:39:33 -04:00
media
media: vb2: Makefile: place vb2-trace together with vb2-core
2018-02-26 11:39:04 -05:00
memory
memory: brcmstb: dpfe: support new way of passing data from the DCPU
2018-02-23 10:56:59 -08:00
memstick
message
mfd
misc
powerpc fixes for 4.16 #5
2018-03-09 09:33:48 -08:00
mmc
mmc: sdhci-acpi: Fix IRQ 0
2018-03-21 11:10:20 +01:00
mtd
mux
net
net: bgmac: Mask interrupts during probe
2018-03-29 12:06:10 -04:00
nfc
ntb
nubus
nvdimm
libnvdimm, nfit: fix persistence domain reporting
2018-03-21 15:12:07 -07:00
nvme
nvme_fc: rework sqsize handling
2018-03-08 10:39:58 -07:00
nvmem
of
opp
oprofile
parisc
parport
pci
Merge branch 'for-4.16-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata
2018-03-19 14:23:30 -07:00
pcmcia
perf
arm_pmu: Use disable_irq_nosync when disabling SPI in CPU teardown hook
2018-02-28 14:59:47 +00:00
phy
phy: qcom-ufs: add MODULE_LICENSE tag
2018-03-12 15:11:59 +05:30
pinctrl
platform
platform-drivers-x86 for v4.16-7
2018-03-14 13:01:14 -07:00
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
Merge remote-tracking branches 'regulator/fix/resume' and 'regulator/fix/stm32-vfrefbuf' into regulator-linus
2018-03-07 14:39:07 +00:00
remoteproc
reset
rpmsg
rtc
s390
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2018-03-23 11:31:58 -04:00
sbus
scsi
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2018-03-23 11:31:58 -04:00
sfi
sh
siox
slimbus
sn
soc
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2018-03-23 11:31:58 -04:00
soundwire
spi
spmi
ssb
ssb: use put_device() if device_register fail
2018-03-13 18:48:29 +02:00
staging
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2018-03-23 11:31:58 -04:00
target
tc
tee
thermal
thunderbolt
tty
serial: imx: fix bogus dev_err
2018-02-28 13:48:21 +01:00
uio
usb
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2018-03-23 11:31:58 -04:00
uwb
vfio
vfio: disable filesystem-dax page pinning
2018-03-02 18:00:04 -08:00
vhost
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2018-03-23 11:31:58 -04:00
video
fbdev: Fixing arbitrary kernel leak in case FBIOGETCMAP_SPARC in sbusfb_ioctl_helper().
2018-03-07 14:00:34 +01:00
virt
virtio
virtio_ring: fix num_free handling in error case
2018-03-01 18:53:38 +02:00
visorbus
vlynq
vme
w1
watchdog
ACPI / watchdog: Fix off-by-one error at resource assignment
2018-03-19 23:17:07 +01:00
xen
xen: fix for V4.16-rc5
2018-03-09 16:54:18 -08:00
zorro
Kconfig
Makefile