From: David Laight <david.laight.linux@gmail.com>
To: Al Viro <viro@zeniv.linux.org.uk>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>
Cc: David Laight <david.laight.linux@gmail.com>,
Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>
Subject: [PATCH next 1/1] fs: Mark get_sigset_argpack() __always_inline
Date: Sat, 8 Feb 2025 15:13:47 +0000 [thread overview]
Message-ID: <20250208151347.89708-1-david.laight.linux@gmail.com> (raw)
Since the function is 'hot enough' to worry about avoiding the
overhead of copy_from_user() it must be worth forcing it to be
inlined.
Signed-off-by: David Laight <david.laight.linux@gmail.com>
---
I'd guess that gcc is counting up the number of lines in the asm again.
I'm not sure how to handle the indentation of the continuation lines.
Lining up with the ( gives overlong lines.
Elsewhere in this file one, two or four tabs are used.
I picked two tabs - one of my favourite schemes.
fs/select.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/select.c b/fs/select.c
index 7da531b1cf6b..9d508114add1 100644
--- a/fs/select.c
+++ b/fs/select.c
@@ -771,8 +771,8 @@ struct sigset_argpack {
size_t size;
};
-static inline int get_sigset_argpack(struct sigset_argpack *to,
- struct sigset_argpack __user *from)
+static __always_inline int get_sigset_argpack(struct sigset_argpack *to,
+ struct sigset_argpack __user *from)
{
// the path is hot enough for overhead of copy_from_user() to matter
if (from) {
@@ -1343,8 +1343,8 @@ struct compat_sigset_argpack {
compat_uptr_t p;
compat_size_t size;
};
-static inline int get_compat_sigset_argpack(struct compat_sigset_argpack *to,
- struct compat_sigset_argpack __user *from)
+static __always_inline int get_compat_sigset_argpack(struct compat_sigset_argpack *to,
+ struct compat_sigset_argpack __user *from)
{
if (from) {
if (!user_read_access_begin(from, sizeof(*from)))
--
2.39.5
next reply other threads:[~2025-02-08 15:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-08 15:13 David Laight [this message]
2025-02-08 18:53 ` [PATCH next 1/1] fs: Mark get_sigset_argpack() __always_inline Linus Torvalds
2025-02-08 18:57 ` David Laight
2025-02-08 19:06 ` David Laight
2025-02-08 20:03 ` Linus Torvalds
2025-02-08 23:05 ` David Laight
2025-02-10 13:59 ` Mateusz Guzik
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=20250208151347.89708-1-david.laight.linux@gmail.com \
--to=david.laight.linux@gmail.com \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
/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