Re: [PATCH v6 0/2] Drivers: hv: Introduce new driver - mshv_vtl

From: Naman Jain
Date: Thu Jul 24 2025 - 11:45:16 EST




On 7/24/2025 4:56 PM, Markus Elfring wrote:


Do you see opportunities to extend guard applications for further data structures?


So I actually extended using guard to all the other places where I was
using manual mutex lock/unlock. I had to reorganize the code a bit,
which made the overall flow simpler and more robust. If I am missing
something, please let me know.

Can you imagine that similar adjustments will become helpful at further
source code places also according to other pairs of function/macro calls?
https://elixir.bootlin.com/linux/v6.16-rc7/source/include/linux/rcupdate.h#L1155-L1167

How do you think about to fiddle any more with “constructors” and “destructors”?

Regards,
Markus

I have one other usage of rcu_read_lock/unlock in the code, which I feel is fine in its current form.

Thanks,
Naman Jain