All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH next 1/1] fs: Mark get_sigset_argpack() __always_inline
@ 2025-02-08 15:13 David Laight
  2025-02-08 18:53 ` Linus Torvalds
  0 siblings, 1 reply; 7+ messages in thread
From: David Laight @ 2025-02-08 15:13 UTC (permalink / raw)
  To: Al Viro, linux-fsdevel, linux-kernel, Linus Torvalds
  Cc: David Laight, Christian Brauner, Jan Kara

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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-02-10 14:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-08 15:13 [PATCH next 1/1] fs: Mark get_sigset_argpack() __always_inline David Laight
2025-02-08 18:53 ` 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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.