Re: [PATCH] hv_balloon: Update the balloon driver to use the SBRM API
From: Wei Liu <wei.liu@kernel.org>
Date: 2023-08-03 22:07:39
Also in:
lkml
On Mon, Jul 31, 2023 at 02:25:13PM -0700, Boqun Feng wrote:
Hi Mitchell, On Wed, Jul 26, 2023 at 12:23:31AM +0000, Mitchell Levy via B4 Relay wrote:quoted
From: Mitchell Levy <redacted> ---I don't know whether it's a tool issue or something else, but all words after the "---" line in the email will be discarded from a commit log. You can try to apply this patch yourself and see the result: b4 shazam 20230726-master-v1-1-b2ce6a4538db@gmail.comquoted
This patch is intended as a proof-of-concept for the new SBRM machinery[1]. For some brief background, the idea behind SBRM is using the __cleanup__ attribute to automatically unlock locks (or otherwise release resources) when they go out of scope, similar to C++ style RAII. This promises some benefits such as making code simpler (particularly where you have lots of goto fail; type constructs) as well as reducing the surface area for certain kinds of bugs. The changes in this patch should not result in any difference in how the code actually runs (i.e., it's purely an exercise in this new syntax sugar). In one instance SBRM was not appropriate, so I left that part alone, but all other locking/unlocking is handled automatically in this patch. Link: https://lore.kernel.org/all/20230626125726.GU4253@hirez.programming.kicks-ass.net/ (local) [1] Suggested-by: Boqun Feng <redacted> Signed-off-by: "Mitchell Levy (Microsoft)" <redacted>Beside the above format issue, the code looks good to me, nice job! Feel free to add: Reviewed-by: Boqun Feng <redacted>
FAOD I'm expecting a v2 of this patch. Thanks, Wei.
Regards, Boqun