* [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* Re: [PATCH] fs: annotate cdev_lock with __cacheline_aligned_in_smp
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
1 sibling, 0 replies; 3+ messages in thread
From: Jan Kara @ 2025-12-03 10:32 UTC (permalink / raw)
To: Mateusz Guzik; +Cc: brauner, viro, jack, linux-kernel, linux-fsdevel
On Wed 03-12-25 10:55:08, Mateusz Guzik wrote:
> No need for the crapper to be susceptible to false-sharing.
>
> Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Looks good. Feel free to add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> 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
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] fs: annotate cdev_lock with __cacheline_aligned_in_smp
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
1 sibling, 0 replies; 3+ messages in thread
From: Christian Brauner @ 2025-12-04 9:12 UTC (permalink / raw)
To: Mateusz Guzik; +Cc: Christian Brauner, viro, jack, linux-kernel, linux-fsdevel
On Wed, 03 Dec 2025 10:55:08 +0100, Mateusz Guzik wrote:
> No need for the crapper to be susceptible to false-sharing.
>
>
Applied to the vfs-6.20.misc branch of the vfs/vfs.git tree.
Patches in the vfs-6.20.misc branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-6.20.misc
[1/1] fs: annotate cdev_lock with __cacheline_aligned_in_smp
https://git.kernel.org/vfs/vfs/c/6913380839e5
^ 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®