[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YeAFpSUknjhoeYqi@kroah.com>
Date: Thu, 13 Jan 2022 11:57:41 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: Imran Khan <imran.f.khan@...cle.com>
Cc: tj@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 0/2] kernfs: use hashed mutex and spinlock in place of
global ones
On Thu, Jan 13, 2022 at 09:42:57PM +1100, Imran Khan wrote:
> Reduce contention around global locks used in kernfs.
>
> PATCH-1: Make global kernfs_open_file_mutex and kernfs_open_node_lock
> hashed locks, where address of a kernfs_node acts as hash key.
> This results in kernfs_node objects, whose address give the
> different hash value, using different kernfs_open_file_mutex
> and kernfs_open_node_lock rather than all kernfs_node objects
> using the same kernfs_open_file_mutex and kernfs_open_node_lock
> as was the case earlier.
>
> PATCH-2: Use a hashed rw_semaphore to access permissions, so that we can
> avoid contention around global per-fs rw_semaphore, seen if
> multiple applications are executing inode_permission and
> walk_component in parallel when trying to open sysfs file(s).
>
> ------------------------------------------------------------------
>
> Changes since v2:
> - Remove RFC tag
> - Use hashed locks rather than using per kernfs_node specific lock
> (Suggested by Tejun Heo <tj@...nel.org>)
>
I will look at this closer after the merge window is closed (can't do
anything until then), but do these changes actually solve your
contention problem? You don't say so here, so it's hard to tell.
thanks,
greg k-h
Powered by blists - more mailing lists