summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMateusz Guzik <mjguzik@gmail.com>2025-12-03 10:28:50 +0100
committerChristian Brauner <brauner@kernel.org>2025-12-15 14:33:38 +0100
commitc0aac5975bafc86f6817b14e9f71dcb5064a9183 (patch)
tree46879afc5c35b7472bbb9a98019748f5934c2453 /include/linux
parent887e97745ec336c2f49b6c0af3c4cc00a5df3211 (diff)
ns: pad refcount
Note no effort is made to make sure structs embedding the namespace are themselves aligned, so this is not guaranteed to eliminate cacheline bouncing due to refcount management. Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Link: https://patch.msgid.link/20251203092851.287617-2-mjguzik@gmail.com Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ns/ns_common_types.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/ns/ns_common_types.h b/include/linux/ns/ns_common_types.h
index b332b019b29c..0014fbc1c626 100644
--- a/include/linux/ns/ns_common_types.h
+++ b/include/linux/ns/ns_common_types.h
@@ -108,11 +108,13 @@ extern const struct proc_ns_operations utsns_operations;
* @ns_tree: namespace tree nodes and active reference count
*/
struct ns_common {
+ struct {
+ refcount_t __ns_ref; /* do not use directly */
+ } ____cacheline_aligned_in_smp;
u32 ns_type;
struct dentry *stashed;
const struct proc_ns_operations *ops;
unsigned int inum;
- refcount_t __ns_ref; /* do not use directly */
union {
struct ns_tree;
struct rcu_head ns_rcu;