linux/drivers
Linus Torvalds 4c797b11a8 vfs-6.13.file
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRAhzRXHqcMeLMyaSiRxhvAZXjcogUCZzcW4gAKCRCRxhvAZXjc
 okF+AP9xTMb2SlnRPBOBd9yFcmVXmQi86TSCUPAEVb+wIldGYwD/RIOdvXYJlp9v
 RgJkU1DC3ddkXtONNDY6gFaP+siIWA0=
 =gMc7
 -----END PGP SIGNATURE-----

Merge tag 'vfs-6.13.file' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs

Pull vfs file updates from Christian Brauner:
 "This contains changes the changes for files for this cycle:

   - Introduce a new reference counting mechanism for files.

     As atomic_inc_not_zero() is implemented with a try_cmpxchg() loop
     it has O(N^2) behaviour under contention with N concurrent
     operations and it is in a hot path in __fget_files_rcu().

     The rcuref infrastructures remedies this problem by using an
     unconditional increment relying on safe- and dead zones to make
     this work and requiring rcu protection for the data structure in
     question. This not just scales better it also introduces overflow
     protection.

     However, in contrast to generic rcuref, files require a memory
     barrier and thus cannot rely on *_relaxed() atomic operations and
     also require to be built on atomic_long_t as having massive amounts
     of reference isn't unheard of even if it is just an attack.

     This adds a file specific variant instead of making this a generic
     library.

     This has been tested by various people and it gives consistent
     improvement up to 3-5% on workloads with loads of threads.

   - Add a fastpath for find_next_zero_bit(). Skip 2-levels searching
     via find_next_zero_bit() when there is a free slot in the word that
     contains the next fd. This improves pts/blogbench-1.1.0 read by 8%
     and write by 4% on Intel ICX 160.

   - Conditionally clear full_fds_bits since it's very likely that a bit
     in full_fds_bits has been cleared during __clear_open_fds(). This
     improves pts/blogbench-1.1.0 read up to 13%, and write up to 5% on
     Intel ICX 160.

   - Get rid of all lookup_*_fdget_rcu() variants. They were used to
     lookup files without taking a reference count. That became invalid
     once files were switched to SLAB_TYPESAFE_BY_RCU and now we're
     always taking a reference count. Switch to an already existing
     helper and remove the legacy variants.

   - Remove pointless includes of <linux/fdtable.h>.

   - Avoid cmpxchg() in close_files() as nobody else has a reference to
     the files_struct at that point.

   - Move close_range() into fs/file.c and fold __close_range() into it.

   - Cleanup calling conventions of alloc_fdtable() and expand_files().

   - Merge __{set,clear}_close_on_exec() into one.

   - Make __set_open_fd() set cloexec as well instead of doing it in two
     separate steps"

* tag 'vfs-6.13.file' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
  selftests: add file SLAB_TYPESAFE_BY_RCU recycling stressor
  fs: port files to file_ref
  fs: add file_ref
  expand_files(): simplify calling conventions
  make __set_open_fd() set cloexec state as well
  fs: protect backing files with rcu
  file.c: merge __{set,clear}_close_on_exec()
  alloc_fdtable(): change calling conventions.
  fs/file.c: add fast path in find_next_fd()
  fs/file.c: conditionally clear full_fds
  fs/file.c: remove sanity_check and add likely/unlikely in alloc_fd()
  move close_range(2) into fs/file.c, fold __close_range() into it
  close_files(): don't bother with xchg()
  remove pointless includes of <linux/fdtable.h>
  get rid of ...lookup...fdget_rcu() family
2024-11-18 10:30:29 -08:00
..
accel accel/ivpu: Fix NOC firewall interrupt handling 2024-10-30 10:17:00 +01:00
accessibility
acpi ACPI: processor: Move arch_init_invariance_cppc() call later 2024-11-06 21:31:36 +01:00
amba
android
ata ata: libata: Set DID_TIME_OUT for commands that actually timed out 2024-10-24 11:14:00 +02:00
atm
auxdisplay
base ACPI: processor: Move arch_init_invariance_cppc() call later 2024-11-06 21:31:36 +01:00
bcma
block
bluetooth Bluetooth: btintel: Direct exception event to bluetooth stack 2024-11-12 11:39:12 -05:00
bus
cache
cdrom
cdx
char tpm: Disable TPM on tpm2_create_primary() failure 2024-11-13 21:10:45 +02:00
clk A handful of Qualcomm clk driver fixes: 2024-11-10 14:16:28 -08:00
clocksource
comedi
connector
counter
cpufreq cpufreq: intel_pstate: Rearrange locking in hybrid_init_cpu_capacity_scaling() 2024-11-11 15:18:41 +01:00
cpuidle
crypto
cxl cxl/port: Prevent out-of-order decoder allocation 2024-10-25 16:07:03 -05:00
dax
dca
devfreq
dio
dma dmaengine fixes for v6.12 2024-11-03 10:15:50 -10:00
dma-buf
dpll
edac
eisa
extcon
firewire firewire: core: fix invalid port index for parent device 2024-10-27 11:14:35 +09:00
firmware pmdomain core: 2024-11-15 10:20:17 -08:00
fpga
fsi
gnss
gpio gpiolib: fix debugfs dangling chip separator 2024-10-31 19:14:17 +01:00
gpu vfs-6.13.file 2024-11-18 10:30:29 -08:00
greybus
hid hid-for-linus-20241105 2024-11-06 07:49:54 -10:00
hsi
hte
hv
hwmon
hwspinlock
hwtracing
i2c i2c: designware: do not hold SCL low when I2C_DYNAMIC_TAR_UPDATE is not set 2024-11-08 19:13:06 +01:00
i3c
idle
iio iio: dac: Kconfig: Fix build error for ltc2664 2024-10-24 18:46:04 +01:00
infiniband Revert "RDMA/core: Fix ENODEV error for iWARP test over vlan" 2024-11-12 09:53:11 -05:00
input Input updates for v6.12-rc5 2024-11-03 08:35:29 -10:00
interconnect
iommu
ipack
irqchip irqchip/gic-v3: Force propagation of the active state with a read-back 2024-11-07 00:22:44 +01:00
isdn
leds
macintosh
mailbox mailbox: qcom-cpucp: Mark the irq with IRQF_NO_SUSPEND flag 2024-11-12 19:45:25 +01:00
mcb
md dm-cache: fix warnings about duplicate slab caches 2024-11-11 17:04:39 +01:00
media media fixes for v6.12-rc7 2024-11-08 07:41:27 -10:00
memory
memstick
message
mfd
misc mei: use kvmalloc for read buffer 2024-10-29 04:01:40 +01:00
mmc Revert "mmc: dw_mmc: Fix IDMAC operation with pages bigger than 4K" 2024-11-12 19:40:40 +01:00
most
mtd
mux
net bonding: add ns target multicast address to slave device 2024-11-14 11:16:28 +01:00
nfc
ntb
nubus
nvdimm
nvme block-6.12-20241108 2024-11-09 12:55:32 -08:00
nvmem
of
opp
parisc
parport
pci pci-v6.12-fixes-2 2024-11-01 15:44:23 -10:00
pcmcia
peci
perf drivers: perf: Fix wrong put_cpu() placement 2024-11-12 07:34:27 -08:00
phy
pinctrl
platform platform-drivers-x86 for v6.12-4 2024-11-06 08:03:19 -10:00
pmdomain pmdomain: imx93-blk-ctrl: correct remove path 2024-11-01 12:53:16 +01:00
pnp
power
powercap
pps
ps3
ptp
pwm pwm: imx-tpm: Use correct MODULO value for EPWM mode 2024-10-25 11:29:17 +02:00
rapidio
ras
regulator regulator: rk808: Add apply_bit for BUCK3 on RK809 2024-11-01 14:47:08 +00:00
remoteproc
reset
rpmsg rpmsg: glink: Handle rejected intent request better 2024-10-24 13:03:37 -05:00
rtc
s390
sbus
scsi SCSI fixes on 20241108 2024-11-08 09:56:27 -10:00
sh
siox
slimbus
soc Qualcomm driver fixes for v6.12 2024-11-04 14:23:09 +01:00
soundwire
spi spi: spi-fsl-dspi: Fix crash when not using GPIO chip select 2024-10-23 22:37:54 +01:00
spmi
ssb
staging Staging driver fixes for 6.12-rc7 2024-11-10 08:53:24 -08:00
target
tc
tee
thermal thermal/of: support thermal zones w/o trips subnode 2024-11-04 15:38:29 +01:00
thunderbolt thunderbolt: Fixes for v6.12-rc7 2024-11-07 16:11:57 +01:00
tty
ufs SCSI fixes on 20241108 2024-11-08 09:56:27 -10:00
uio
usb USB-serial fixes for 6.12-rc7 2024-11-08 08:36:31 +01:00
vdpa vdpa/mlx5: Fix PA offset with unaligned starting iotlb map 2024-11-12 18:05:04 -05:00
vfio
vhost
video
virt
virtio virtio_pci: Fix admin vq cleanup by using correct info pointer 2024-11-06 04:40:07 -05:00
w1
watchdog
xen
zorro
Kconfig
Makefile