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 move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
base ACPI: processor: Move arch_init_invariance_cppc() call later 2024-11-06 21:31:36 +01:00
bcma
block block-6.12-20241018 2024-10-18 15:53:00 -07:00
bluetooth Bluetooth: btintel: Direct exception event to bluetooth stack 2024-11-12 11:39:12 -05:00
bus Driver core update for 6.12-rc1 2024-09-27 08:48:37 -07:00
cache
cdrom cdrom: Avoid barrier_nospec() in cdrom_ioctl_media_changed() 2024-10-17 19:47:15 -06:00
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 Updates for x86 timers: 2024-09-17 15:27:01 +02:00
comedi move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
connector
counter move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
cpufreq cpufreq: intel_pstate: Rearrange locking in hybrid_init_cpu_capacity_scaling() 2024-11-11 15:18:41 +01:00
cpuidle pmdomain core: 2024-09-18 10:49:45 +02:00
crypto This push fixes the following issues: 2024-10-16 08:42:54 -07:00
cxl cxl/port: Prevent out-of-order decoder allocation 2024-10-25 16:07:03 -05:00
dax device-dax: correct pgoff align in dax_set_mapping() 2024-10-09 12:47:19 -07:00
dca
devfreq
dio
dma dmaengine fixes for v6.12 2024-11-03 10:15:50 -10:00
dma-buf drm next for 6.12-rc1 2024-09-19 10:18:15 +02:00
dpll
edac EDAC/qcom: Make irq configuration optional 2024-10-05 22:17:08 -05:00
eisa
extcon Char/Misc and other driver changes for 6.12-rc1 2024-09-26 10:13:08 -07:00
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 move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
fsi move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
gnss [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
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 move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hid hid-for-linus-20241105 2024-11-06 07:49:54 -10:00
hsi
hte
hv drm next for 6.12-rc1 2024-09-19 10:18:15 +02:00
hwmon [PATCH} hwmon: (jc42) Properly detect TSE2004-compliant devices again 2024-10-14 19:14:08 -07:00
hwspinlock
hwtracing [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
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 i3c: master: svc: Fix use after free vulnerability in svc_i3c_master Driver Due to Race Condition 2024-09-17 16:51:45 +02:00
idle intel_idle: fix ACPI _CST matching for newer Xeon platforms 2024-09-25 22:30:33 +02:00
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 iommu/vt-d: Fix incorrect pci_for_each_dma_alias() for non-PCI devices 2024-10-15 10:17:54 +02:00
ipack
irqchip irqchip/gic-v3: Force propagation of the active state with a read-back 2024-11-07 00:22:44 +01:00
isdn move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
leds move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
macintosh move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
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 move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
message SCSI misc on 20240928 2024-09-29 09:22:34 -07:00
mfd move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
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 move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
mux
net bonding: add ns target multicast address to slave device 2024-11-14 11:16:28 +01:00
nfc move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
ntb ntb: Force physically contiguous allocation of rx ring buffers 2024-09-20 10:51:25 -04:00
nubus
nvdimm virtio: features, fixes, cleanups 2024-09-26 08:43:17 -07:00
nvme block-6.12-20241108 2024-11-09 12:55:32 -08:00
nvmem Char/Misc and other driver changes for 6.12-rc1 2024-09-26 10:13:08 -07:00
of of: Skip kunit tests when arm64+ACPI doesn't populate root node 2024-10-10 12:43:01 -05:00
opp OPP: fix error code in dev_pm_opp_set_config() 2024-10-02 01:27:50 +02:00
parisc
parport parport: Proper fix for array out-of-bounds access 2024-10-13 18:17:35 +02:00
pci pci-v6.12-fixes-2 2024-11-01 15:44:23 -10:00
pcmcia move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
peci move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
perf drivers: perf: Fix wrong put_cpu() placement 2024-11-12 07:34:27 -08:00
phy phy: tegra: xusb: Add error pointer check in xusb.c 2024-10-21 23:34:42 +05:30
pinctrl pinctrl: ocelot: fix system hang on level based interrupts 2024-10-12 22:04:38 +02:00
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 move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
powercap powercap: dtpm_devfreq: Fix error check against dev_pm_qos_add_request() 2024-10-21 13:23:06 +02:00
pps [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
ps3
ptp move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
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 mhu-v3, omap2+ : fix kconfig dependencies 2024-09-29 09:53:04 -07:00
reset reset: starfive: jh71x0: Fix accessing the empty member on JH7110 SoC 2024-09-30 14:24:37 +02:00
rpmsg rpmsg: glink: Handle rejected intent request better 2024-10-24 13:03:37 -05:00
rtc move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
s390 s390/sclp_vt220: Convert newlines to CRLF instead of LFCR 2024-10-16 11:32:32 +02:00
sbus [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
scsi SCSI fixes on 20241108 2024-11-08 09:56:27 -10:00
sh sh: intc: Replace simple_strtoul() with kstrtoul() 2024-09-26 17:25:29 +02:00
siox
slimbus
soc Qualcomm driver fixes for v6.12 2024-11-04 14:23:09 +01:00
soundwire soundwire: intel_ace2x: Send PDI stream number during prepare 2024-10-17 12:11:19 +01:00
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 SCSI fixes on 20241019 2024-10-19 12:52:19 -07:00
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 serial: qcom-geni: rename suspend functions 2024-10-11 08:39:24 +02:00
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 [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
vhost virtio: bugfixes 2024-10-07 11:33:26 -07:00
video fbdev: wm8505fb: select CONFIG_FB_IOMEM_FOPS 2024-10-21 11:16:51 +02:00
virt [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
virtio virtio_pci: Fix admin vq cleanup by using correct info pointer 2024-11-06 04:40:07 -05:00
w1
watchdog move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
xen xen: Remove dependency between pciback and privcmd 2024-10-18 11:59:04 +02:00
zorro
Kconfig
Makefile