From: Wei Liu <wei.liu@kernel.org>
To: levymitchell0@gmail.com
Cc: "K. Y. Srinivasan" <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
Wei Liu <wei.liu@kernel.org>, Dexuan Cui <decui@microsoft.com>,
linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org,
mikelley@microsoft.com, peterz@infradead.org,
Boqun Feng <boqun.feng@gmail.com>
Subject: Re: [PATCH v2] hv_balloon: Update the balloon driver to use the SBRM API
Date: Fri, 11 Aug 2023 21:07:12 +0000 [thread overview]
Message-ID: <ZNajAHD7KLfwR140@liuwe-devbox-debian-v2> (raw)
In-Reply-To: <20230807-sbrm-hyperv-v2-1-9d2ac15305bd@gmail.com>
On Mon, Aug 07, 2023 at 11:55:47PM +0000, Mitchell Levy via B4 Relay wrote:
> From: Mitchell Levy <levymitchell0@gmail.com>
>
> 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.
>
> [1] https://lore.kernel.org/all/20230626125726.GU4253@hirez.programming.kicks-ass.net/
>
> Suggested-by: Boqun Feng <boqun.feng@gmail.com>
> Signed-off-by: "Mitchell Levy (Microsoft)" <levymitchell0@gmail.com>
> Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Applied to hyperv-next. Thanks!
prev parent reply other threads:[~2023-08-11 21:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-07 23:55 [PATCH v2] hv_balloon: Update the balloon driver to use the SBRM API Mitchell Levy via B4 Relay
2023-08-11 21:07 ` Wei Liu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZNajAHD7KLfwR140@liuwe-devbox-debian-v2 \
--to=wei.liu@kernel.org \
--cc=boqun.feng@gmail.com \
--cc=decui@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=levymitchell0@gmail.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mikelley@microsoft.com \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox