[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250415063718.342738-1-alexjlzheng@tencent.com>
Date: Tue, 15 Apr 2025 14:37:18 +0800
From: Jinliang Zheng <alexjlzheng@...il.com>
To: tj@...nel.org
Cc: alexjlzheng@...il.com,
alexjlzheng@...cent.com,
gregkh@...uxfoundation.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH kernfs 3/3] kernfs: switch global kernfs_pr_cont_lock to per-fs lock
On Mon, 14 Apr 2025 07:27:21 -1000, tj@...nel.org wrote:
> On Sat, Apr 12, 2025 at 02:31:09AM +0800, alexjlzheng@...il.com wrote:
> > From: Jinliang Zheng <alexjlzheng@...cent.com>
> >
> > The kernfs implementation has big lock granularity(kernfs_pr_cont_lock) so
> > every kernfs-based(e.g., sysfs, cgroup) fs are able to compete the lock.
> >
> > This patch switches the global kernfs_pr_cont_lock to per-fs lock, which
> > put the spinlock into kernfs_root. Of course, kernfs_pr_cont_buf also needs
> > to be moved to kernfs_root.
> >
> > Signed-off-by: Jinliang Zheng <alexjlzheng@...cent.com>
>
> I don't think this one makes sense. There are lots more things that are
> globally synchronizing in the printk pass. This is necessarily a really cold
> path and it doesn't make anything better to split this lock.
Thank you for your reply, :)
>From a performance perspective, I agree. From a design perspective, I can
only agree 50%, hahahaha.
But compared to the other two global locks in this patchset, the changes to
this lock are relatively unimportant.
thanks,
Jinliang Zheng :)
>
> Thanks.
>
> --
> tejun
Powered by blists - more mailing lists