Re: [RFC][PATCH 1/2] locking: Introduce __cleanup__ based guards

From: Waiman Long
Date: Fri May 26 2023 - 15:05:41 EST


On 5/26/23 14:58, Mathieu Desnoyers wrote:
On 5/26/23 14:49, Waiman Long wrote:
[...]

BTW, do we have a use case for double_lock_guard/double_lock_scope? I can envision a nested lock_scope inside a lock_scope, but taking 2 auto locks of the same type at init time and then unlock them at exit just doesn't make sense to me.

AFAIU taking both runqueue locks for source and destination runqueues on migration is one use-case for double_lock_guard/scope.

I see. Thanks for the clarification. I forgot about that special case.

Cheers,
Longman