Re: [PATCH v3 2/2] kernfs: Reduce contention around global per-fs kernfs_rwsem.
From: Tejun Heo
Date: Fri Jan 14 2022 - 12:44:31 EST
Hello,
On Sat, Jan 15, 2022 at 04:08:10AM +1100, Imran Khan wrote:
> I have made changes inline with your suggestion to synchronize
> addition/removal through hashed locks but so far I am not using tokens.
> I am currently testing these changes (so far no issues seen). Before
> floating next version for review I wanted to understand the reason
> behind need of tokens. Could you please elaborate a bit about what needs
> / may have to be recorded in tokens. Just one example will do. It would
> help me consolidate the next version of this change without overlooking
> something.
Oh, just sth to carry what needs to be done to unlock. If you didn't need
them and returning pointers to the locks was enough, that's fine too but if
double locking was necessary for e.g. removals, encapsulating it in a struct
may be neater.
Thanks.
--
tejun