linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Christian Brauner <brauner@kernel.org>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [GIT PULL] vfs file
Date: Sat, 22 Mar 2025 11:17:12 +0100	[thread overview]
Message-ID: <20250322-vfs-file-98e9b1f4bb07@brauner> (raw)

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@gitolite.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(-)

             reply	other threads:[~2025-03-22 10:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-22 10:17 Christian Brauner [this message]
2025-03-24 21:01 ` [GIT PULL] vfs file pr-tracker-bot
  -- strict thread matches above, loose matches on Subject: below --
2024-11-15 14:02 Christian Brauner
2024-11-18 19:49 ` pr-tracker-bot
2024-09-13 14:43 Christian Brauner
2024-09-16  7:34 ` pr-tracker-bot
2023-06-23 11:03 [GIT PULL] vfs: file Christian Brauner
2023-06-26 17:34 ` pr-tracker-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250322-vfs-file-98e9b1f4bb07@brauner \
    --to=brauner@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).