From: Tejun Heo <tj@kernel.org>
To: gregkh@linuxfoundation.org
Cc: andrea.righi@canonical.com, ast@kernel.org,
linux-kernel@vger.kernel.org, geert@linux-m68k.org,
Tejun Heo <tj@kernel.org>
Subject: [PATCH 2/3] kernfs: Rearrange kernfs_node fields to reduce its size on 64bit
Date: Tue, 9 Jan 2024 11:48:03 -1000 [thread overview]
Message-ID: <20240109214828.252092-3-tj@kernel.org> (raw)
In-Reply-To: <20240109214828.252092-1-tj@kernel.org>
Moving .flags and .mode right below .hash makes kernfs_node smaller by 8
bytes on 64bit.
Signed-off-by: Tejun Heo <tj@kernel.org>
---
include/linux/kernfs.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h
index 99aaa050ccb7..03c3fb83ab9e 100644
--- a/include/linux/kernfs.h
+++ b/include/linux/kernfs.h
@@ -206,6 +206,9 @@ struct kernfs_node {
const void *ns; /* namespace tag */
unsigned int hash; /* ns + name hash */
+ unsigned short flags;
+ umode_t mode;
+
union {
struct kernfs_elem_dir dir;
struct kernfs_elem_symlink symlink;
@@ -220,8 +223,6 @@ struct kernfs_node {
*/
u64 id;
- unsigned short flags;
- umode_t mode;
struct kernfs_iattrs *iattr;
};
--
2.43.0
next prev parent reply other threads:[~2024-01-09 21:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-09 21:48 [PATCHSET driver-core-next] kernfs: Protect kernfs_find_and_get_node_by_id() with RCU Tejun Heo
2024-01-09 21:48 ` [PATCH 1/3] Revert "kernfs: convert kernfs_idr_lock to an irq safe raw spinlock" Tejun Heo
2024-01-09 21:48 ` Tejun Heo [this message]
2024-01-10 15:18 ` [PATCH 2/3] kernfs: Rearrange kernfs_node fields to reduce its size on 64bit Geert Uytterhoeven
2024-01-10 18:26 ` Tejun Heo
2024-01-10 18:28 ` [PATCH v2 " Tejun Heo
2024-01-09 21:48 ` [PATCH 3/3] kernfs: RCU protect kernfs_nodes and avoid kernfs_idr_lock in kernfs_find_and_get_node_by_id() Tejun Heo
2024-01-10 7:40 ` [PATCHSET driver-core-next] kernfs: Protect kernfs_find_and_get_node_by_id() with RCU Andrea Righi
2024-01-10 15:52 ` Greg KH
2024-01-12 12:34 ` Geert Uytterhoeven
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=20240109214828.252092-3-tj@kernel.org \
--to=tj@kernel.org \
--cc=andrea.righi@canonical.com \
--cc=ast@kernel.org \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.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 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.