linux/drivers
Linus Torvalds 3352633ce6 vfs-6.12.file
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRAhzRXHqcMeLMyaSiRxhvAZXjcogUCZuQEwAAKCRCRxhvAZXjc
 osS0AQCgIpvey9oW5DMyMw6Bv0hFMRv95gbNQZfHy09iK+NMNAD9GALhb/4cMIVB
 7YrZGXEz454lpgcs8AnrOVjVNfctOQg=
 =e9s9
 -----END PGP SIGNATURE-----

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

Pull vfs file updates from Christian Brauner:
 "This is the work to cleanup and shrink struct file significantly.

  Right now, (focusing on x86) struct file is 232 bytes. After this
  series struct file will be 184 bytes aka 3 cacheline and a spare 8
  bytes for future extensions at the end of the struct.

  With struct file being as ubiquitous as it is this should make a
  difference for file heavy workloads and allow further optimizations in
  the future.

   - struct fown_struct was embedded into struct file letting it take up
     32 bytes in total when really it shouldn't even be embedded in
     struct file in the first place. Instead, actual users of struct
     fown_struct now allocate the struct on demand. This frees up 24
     bytes.

   - Move struct file_ra_state into the union containg the cleanup hooks
     and move f_iocb_flags out of the union. This closes a 4 byte hole
     we created earlier and brings struct file to 192 bytes. Which means
     struct file is 3 cachelines and we managed to shrink it by 40
     bytes.

   - Reorder struct file so that nothing crosses a cacheline.

     I suspect that in the future we will end up reordering some members
     to mitigate false sharing issues or just because someone does
     actually provide really good perf data.

   - Shrinking struct file to 192 bytes is only part of the work.

     Files use a slab that is SLAB_TYPESAFE_BY_RCU and when a kmem cache
     is created with SLAB_TYPESAFE_BY_RCU the free pointer must be
     located outside of the object because the cache doesn't know what
     part of the memory can safely be overwritten as it may be needed to
     prevent object recycling.

     That has the consequence that SLAB_TYPESAFE_BY_RCU may end up
     adding a new cacheline.

     So this also contains work to add a new kmem_cache_create_rcu()
     function that allows the caller to specify an offset where the
     freelist pointer is supposed to be placed. Thus avoiding the
     implicit addition of a fourth cacheline.

   - And finally this removes the f_version member in struct file.

     The f_version member isn't particularly well-defined. It is mainly
     used as a cookie to detect concurrent seeks when iterating
     directories. But it is also abused by some subsystems for
     completely unrelated things.

     It is mostly a directory and filesystem specific thing that doesn't
     really need to live in struct file and with its wonky semantics it
     really lacks a specific function.

     For pipes, f_version is (ab)used to defer poll notifications until
     a write has happened. And struct pipe_inode_info is used by
     multiple struct files in their ->private_data so there's no chance
     of pushing that down into file->private_data without introducing
     another pointer indirection.

     But pipes don't rely on f_pos_lock so this adds a union into struct
     file encompassing f_pos_lock and a pipe specific f_pipe member that
     pipes can use. This union of course can be extended to other file
     types and is similar to what we do in struct inode already"

* tag 'vfs-6.12.file' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (26 commits)
  fs: remove f_version
  pipe: use f_pipe
  fs: add f_pipe
  ubifs: store cookie in private data
  ufs: store cookie in private data
  udf: store cookie in private data
  proc: store cookie in private data
  ocfs2: store cookie in private data
  input: remove f_version abuse
  ext4: store cookie in private data
  ext2: store cookie in private data
  affs: store cookie in private data
  fs: add generic_llseek_cookie()
  fs: use must_set_pos()
  fs: add must_set_pos()
  fs: add vfs_setpos_cookie()
  s390: remove unused f_version
  ceph: remove unused f_version
  adi: remove unused f_version
  mm: Removed @freeptr_offset to prevent doc warning
  ...
2024-09-16 09:14:02 +02:00
..
accel Merge tag 'drm-habanalabs-next-2024-06-23' of https://github.com/HabanaAI/drivers.accel.habanalabs.kernel into drm-next 2024-06-28 09:41:04 +10:00
accessibility treewide: remove unnecessary <linux/version.h> inclusion 2024-08-12 18:36:44 +09:00
acpi Thermal control updates for 6.12-rc1 2024-09-16 08:05:54 +02:00
amba ARM: 9416/1: amba: make amba_bustype constant 2024-09-04 15:01:17 +01:00
android binder: fix UAF caused by offsets overwrite 2024-09-03 12:18:46 +02:00
ata ata: libata: Fix memory leak for error path in ata_host_alloc() 2024-08-27 06:54:36 +09:00
atm atm: idt77252: prevent use after free in dequeue_rx() 2024-08-12 10:41:44 +01:00
auxdisplay auxdisplay updates for v6.11 2024-07-26 11:04:28 -07:00
base driver core: Fix uevent_show() vs driver detach race 2024-07-31 14:41:44 +02:00
bcma driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
block block-6.11-20240906 2024-09-06 12:04:06 -07:00
bluetooth Bluetooth: btintel_pcie: Allocate memory for driver private data 2024-09-12 17:32:42 -04:00
bus bus: bt1-apb: change to use devm_clk_get_enabled() helper 2024-08-29 10:45:13 +02:00
cache cache: StarFive: Require a 64-bit system 2024-08-01 07:15:02 -07:00
cdrom sysctl: treewide: constify the ctl_table argument of proc_handlers 2024-07-24 20:59:29 +02:00
cdx driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
char vfs-6.12.file 2024-09-16 09:14:02 +02:00
clk clk: qcom: clk-alpha-pll: Simplify the zonda_pll_adjust_l_val() 2024-09-09 14:06:07 -07:00
clocksource hyperv-fixes for 6.11-rc8 2024-09-09 09:31:55 -07:00
comedi
connector
counter Char/Misc and other driver changes for 6.11-rc1 2024-07-19 15:55:08 -07:00
cpufreq second round of amd-pstate changes for 6.12 (second try): 2024-09-11 18:22:23 +02:00
cpuidle cpuidle: remove dead code from cpuidle_enter_state() 2024-08-22 21:03:52 +02:00
crypto crypto: n2 - Set err to EINVAL if snprintf fails for hmac 2024-09-13 18:26:53 +08:00
cxl cxl/pci: Get AER capability address from RCRB only for RCH dport 2024-08-09 15:13:07 -07:00
dax Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
dca Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
devfreq PM / devfreq: imx-bus: Use of_property_present() 2024-09-05 01:23:56 +09:00
dio dio: Have dio_bus_match() callback take a const * 2024-07-10 15:38:14 +02:00
dma dmaengine: dw-edma: Do not enable watermark interrupts for HDMA 2024-08-28 18:40:17 +05:30
dma-buf dma-buf: heaps: Fix off-by-one in CMA heap fault handler 2024-09-09 15:37:20 +05:30
dpll dpll: add Embedded SYNC feature for a pin 2024-08-26 19:21:14 -07:00
edac - Drop a now obsolete ppc4xx_edac driver 2024-09-16 06:36:37 +02:00
eisa driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
extcon extcon: axp288: Switch to new Intel CPU model defines 2024-09-04 17:58:43 +02:00
firewire Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
firmware arm64 updates for 6.12 2024-09-16 06:55:07 +02:00
fpga Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
fsi fsi: add missing MODULE_DESCRIPTION() macros 2024-07-31 13:40:00 +02:00
gnss
gpio gpio: modepin: Enable module autoloading 2024-09-02 15:00:53 +02:00
gpu vfs-6.12.folio 2024-09-16 08:54:30 +02:00
greybus Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
hid hid-for-linus-2024081901 2024-08-19 11:02:13 -07:00
hsi Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
hte hte: tegra-194: add missing MODULE_DESCRIPTION() macro 2024-06-19 12:24:03 -07:00
hv hyperv-fixes for 6.11-rc8 2024-09-09 09:31:55 -07:00
hwmon hwmon: (pmbus) Conditionally clear individual status bits for pmbus rev >= 1.2 2024-09-09 10:58:09 -07:00
hwspinlock
hwtracing Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
i2c i2c: tegra: Do not mark ACPI devices as irq safe 2024-08-15 00:22:28 +02:00
i3c I3C for 6.11 2024-07-27 10:53:06 -07:00
idle intel_idle: Disable promotion to C1E on Jasper Lake and Elkhart Lake 2024-08-20 21:27:43 +02:00
iio iio: imu: inv_mpu6050: fix interrupt status read for old buggy chips 2024-08-17 15:31:41 +01:00
infiniband IOMMU Updates for Linux v6.11 2024-07-19 09:59:58 -07:00
input vfs-6.12.file 2024-09-16 09:14:02 +02:00
interconnect Char/Misc and other driver changes for 6.11-rc1 2024-07-19 15:55:08 -07:00
iommu ARM development updates for v6.12-rc1 2024-09-16 06:32:08 +02:00
ipack driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
irqchip irqchip/sifive-plic: Add ACPI support 2024-09-02 14:20:25 +02:00
isdn mISDN: Fix a use after free in hfcmulti_tx() 2024-07-25 08:05:05 -07:00
leds - Core Frameworks 2024-07-17 17:51:30 -07:00
macintosh sysctl: treewide: constify the ctl_table argument of proc_handlers 2024-07-25 12:58:36 -07:00
mailbox mailbox: mtk-cmdq: Move devm_mbox_controller_register() after devm_pm_runtime_enable() 2024-07-19 21:25:23 -05:00
mcb Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
md vfs-6.12.misc 2024-09-16 08:35:09 +02:00
media ARM development updates for v6.12-rc1 2024-09-16 06:32:08 +02:00
memory
memstick Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
message
mfd Devicetree fixes for 6.11, part 1 2024-07-27 12:46:16 -07:00
misc VMCI: Fix use-after-free when removing resource in vmci_resource_remove() 2024-09-03 13:16:42 +02:00
mmc mmc: cqhci: Fix checking of CQHCI_HALT state 2024-09-03 14:20:51 +02:00
most Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
mtd This pull request contains updates (actually, just fixes) for UBI and UBIFS: 2024-07-28 11:51:51 -07:00
mux
net vfs-6.12.file 2024-09-16 09:14:02 +02:00
nfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-08-29 11:49:10 -07:00
ntb Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
nubus
nvdimm nvdimm/pmem: Set dax flag for all 'PFN_MAP' cases 2024-08-09 14:29:58 -05:00
nvme nvmet: Identify-Active Namespace ID List command should reject invalid nsid 2024-09-03 10:05:40 -07:00
nvmem nvmem: Fix return type of devm_nvmem_device_get() in kerneldoc 2024-09-03 12:20:41 +02:00
of A revert for a previous TTM commit causing stuttering, 3 fixes for 2024-08-30 11:28:11 +10:00
opp Merge branches 'pm-sleep', 'pm-opp' and 'pm-tools' 2024-09-11 19:02:23 +02:00
parisc
parport sysctl: treewide: constify the ctl_table argument of proc_handlers 2024-07-25 12:58:36 -07:00
pci ACPI updates for 6.12-rc1 2024-09-16 07:41:48 +02:00
pcmcia Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
peci Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
perf arm64 updates for 6.12 2024-09-16 06:55:07 +02:00
phy phy: xilinx: phy-zynqmp: Fix SGMII linkup failure on resume 2024-08-05 21:46:58 +05:30
pinctrl pinctrl: pinctrl-cy8c95x0: Fix regcache 2024-09-13 13:14:18 +02:00
platform Thermal control updates for 6.12-rc1 2024-09-16 08:05:54 +02:00
pmdomain pmdomain: imx: wait SSAR when i.MX93 power domain on 2024-08-15 12:47:09 +02:00
pnp driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
power power sequencing fixes for v6.11-rc6 2024-09-01 09:07:44 +12:00
powercap powercap: intel_rapl: Change an error pointer to NULL 2024-08-23 15:45:17 +02:00
pps Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
ps3
ptp ptp: ptp_ines: Remove setting of RX software timestamp 2024-09-09 17:44:42 -07:00
pwm pwm: stm32: Use the right CCxNP bit in stm32_pwm_enable() 2024-09-05 11:12:01 +02:00
rapidio driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
ras RAS/AMD/ATL: Translate normalized to system physical addresses using PRM 2024-08-01 14:36:29 +02:00
regulator regulator: Fixes for v6.11 2024-07-27 12:27:52 -07:00
remoteproc rpmsg updates for v6.11 2024-07-23 13:41:59 -07:00
reset Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
rpmsg Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
rtc rtc: stm32: add new st,stm32mp25-rtc compatible and check RIF configuration 2024-07-10 17:15:33 +02:00
s390 vfs-6.12.file 2024-09-16 09:14:02 +02:00
sbus sbus: add missing MODULE_DESCRIPTION() macros 2024-07-11 15:42:03 +02:00
scsi Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-09-05 20:37:20 -07:00
sh driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
siox Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
slimbus Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
soc Qualcomm driver fixes for v6.11 2024-08-28 20:27:39 +00:00
soundwire soundwire: stream: Revert "soundwire: stream: fix programming slave ports for non-continous port maps" 2024-09-11 13:05:43 +05:30
spi spi: nxp-fspi: fix the KASAN report out-of-bounds bug 2024-09-11 22:25:44 +01:00
spmi spmi: pmic-arb: add missing newline in dev_err format strings 2024-07-31 13:49:28 +02:00
ssb driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
staging Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-09-12 17:11:24 -07:00
target
tc driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
tee Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
thermal - Add power domain DT bindings for new Amlogic SoCs (Georges Stark) 2024-09-10 10:54:15 +02:00
thunderbolt thunderbolt: Mark XDomain as unplugged when router is removed 2024-08-06 08:01:10 +03:00
tty file: reclaim 24 bytes from f_owner 2024-08-28 13:05:39 +02:00
ufs scsi: ufs: ufs-mediatek: Add UFSHCD_QUIRK_BROKEN_LSDBS_CAP 2024-08-28 21:29:20 -04:00
uio Drivers: hv: vmbus: Fix rescind handling in uio_hv_generic 2024-09-03 12:37:38 +02:00
usb usb: typec: ucsi: Fix cable registration 2024-09-03 19:26:18 +02:00
vdpa virtio: fixes 2024-07-29 12:53:37 -07:00
vfio Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
vhost Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-08-08 14:04:17 -07:00
video video/aperture: optionally match the device in sysfb_disable() 2024-08-26 19:14:48 -04:00
virt arm64 updates for 6.12 2024-09-16 06:55:07 +02:00
virtio virtio: allow driver to disable the configure change notification 2024-08-15 19:14:19 -07:00
w1
watchdog linux-watchdog 6.11-rc1 tag 2024-07-25 10:18:35 -07:00
xen Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
zorro Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
Kconfig
Makefile