On Wed, Feb 9, 2022 at 12:17 PM Waiman Long <longman@xxxxxxxxxx> wrote:
Yeah, but I'm afraid that it could be easy to miss something.
On 2/9/22 14:45, Namhyung Kim wrote:
On Wed, Feb 9, 2022 at 11:28 AM Mathieu DesnoyersWe may have to invent some new APIs to do that. For example,
<mathieu.desnoyers@xxxxxxxxxxxx> wrote:
----- On Feb 9, 2022, at 2:22 PM, Namhyung Kim namhyung@xxxxxxxxxx wrote:Isn't it still the same if we have static lock classes that the entry needs
I'm also concerning dynamic allocated locks in a data structure.I was wondering about this use case as well. Can we make it mandatory to
If we keep the info in a hash table, we should delete it when the
lock is gone. I'm not sure we have a good place to hook it up all.
declare the lock "class" (including the name) statically, even though the
lock per-se is allocated dynamically ? Then the initialization of the lock
embedded within the data structure would simply refer to the lock class
definition.
to be deleted from the hash table when it frees the data structure?
I'm more concerned about free than alloc as there seems to be no
API to track that in a place.
spin_lock_exit() can be the counterpart of spin_lock_init() and so on.
Of course, existing kernel code have to be modified to designate the
point after which a lock is no longer being used or is freed.
Also it would add some runtime overhead due to maintaining
the hash table even if the tracepoints are not used.