mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fs: annotate cdev_lock with __cacheline_aligned_in_smp
@ 2025-12-03  9:55 Mateusz Guzik
  2025-12-03 10:32 ` Jan Kara
  2025-12-04  9:12 ` Christian Brauner
  0 siblings, 2 replies; 3+ messages in thread
From: Mateusz Guzik @ 2025-12-03  9:55 UTC (permalink / raw)
  To: brauner; +Cc: viro, jack, linux-kernel, linux-fsdevel, Mateusz Guzik

No need for the crapper to be susceptible to false-sharing.

Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
---
 fs/char_dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/char_dev.c b/fs/char_dev.c
index c2ddb998f3c9..84a5a0699373 100644
--- a/fs/char_dev.c
+++ b/fs/char_dev.c
@@ -343,7 +343,7 @@ void __unregister_chrdev(unsigned int major, unsigned int baseminor,
 	kfree(cd);
 }
 
-static DEFINE_SPINLOCK(cdev_lock);
+static __cacheline_aligned_in_smp DEFINE_SPINLOCK(cdev_lock);
 
 static struct kobject *cdev_get(struct cdev *p)
 {
-- 
2.48.1


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

end of thread, other threads:[~2025-12-04  9:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-03  9:55 [PATCH] fs: annotate cdev_lock with __cacheline_aligned_in_smp Mateusz Guzik
2025-12-03 10:32 ` Jan Kara
2025-12-04  9:12 ` Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®