Unverified Commit c0aac597 authored by Mateusz Guzik's avatar Mateusz Guzik Committed by Christian Brauner
Browse files

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: default avatarMateusz Guzik <mjguzik@gmail.com>
Link: https://patch.msgid.link/20251203092851.287617-2-mjguzik@gmail.com


Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent 887e9774
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;