lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250322-vfs-file-98e9b1f4bb07@brauner>
Date: Sat, 22 Mar 2025 11:17:12 +0100
From: Christian Brauner <brauner@...nel.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Christian Brauner <brauner@...nel.org>,
	linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [GIT PULL] vfs file

Hey Linus,

/* Summary */

This contains performance improvements for struct file's new refcount
mechanism and various other performance work:

- The stock kernel transitioning the file to no refs held penalizes the
  caller with an extra atomic to block any increments. For cases where
  the file is highly likely to be going away this is easily avoidable.

  Add file_ref_put_close() to better handle the common case where
  closing a file descriptor also operates on the last reference and
  build fput_close_sync() and fput_close() on top of it. This brings
  about 1% performance improvement by eliding one atomic in the common
  case.

- Predict no error in close() since the vast majority of the time system
  call returns 0.

- Reduce the work done in fdget_pos() by predicting that the file was
  found and by explicitly comparing the reference count to one and
  ignoring the dead zone.

/* Testing */

gcc version 14.2.0 (Debian 14.2.0-6)
Debian clang version 16.0.6 (27+b1)

No build failures or warnings were observed.

/* Conflicts */

Merge conflicts with mainline
=============================

No known conflicts.

Merge conflicts with other trees
================================

No known conflicts.

The following changes since commit 2014c95afecee3e76ca4a56956a936e23283f05b:

  Linux 6.14-rc1 (2025-02-02 15:39:26 -0800)

are available in the Git repository at:

  git@...olite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.15-rc1.file

for you to fetch changes up to 5370b43e4bcf60049bfd44db83ba8d2ec43d0152:

  fs: reduce work in fdget_pos() (2025-03-20 09:45:39 +0100)

Please consider pulling these changes from the signed vfs-6.15-rc1.file tag.

Thanks!
Christian

----------------------------------------------------------------
vfs-6.15-rc1.file

----------------------------------------------------------------
Christian Brauner (1):
      Merge patch series "avoid the extra atomic on a ref when closing a fd"

Mateusz Guzik (6):
      fs: predict no error in close()
      file: add fput and file_ref_put routines optimized for use when closing a fd
      fs: use fput_close_sync() in close()
      fs: use fput_close() in filp_close()
      fs: use fput_close() in path_openat()
      fs: reduce work in fdget_pos()

 fs/file.c                | 52 ++++++++++++++++++++---------------
 fs/file_table.c          | 70 +++++++++++++++++++++++++++++++++---------------
 fs/internal.h            |  3 +++
 fs/namei.c               |  2 +-
 fs/open.c                | 15 ++++++-----
 include/linux/file_ref.h | 48 +++++++++++++++++++++++++++++++++
 6 files changed, 141 insertions(+), 49 deletions(-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ