From: Peter Zijlstra <peterz@infradead.org>
To: Alexander Aring <aahringo@redhat.com>
Cc: will@kernel.org, gfs2@lists.linux.dev, boqun.feng@gmail.com,
mark.rutland@arm.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] refcount: introduce __refcount_dec_and_lock macro
Date: Thu, 9 Nov 2023 10:31:52 +0100 [thread overview]
Message-ID: <20231109093152.GS8262@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20231106191138.3179599-2-aahringo@redhat.com>
On Mon, Nov 06, 2023 at 02:11:37PM -0500, Alexander Aring wrote:
> This patch adds the __refcount_dec_and_lock macro to generate code for a
> lock specific refcount_dec_and_lock implementation. Existing
> refcount_dec_and_lock implementation are updated to use the new
> __refcount_dec_and_lock macro. In future other lock implementation can
> added to use the refcount_dec_and_lock trick to only hold the lock when
> the refcount is going to be zero. Per subsystem own lock implementation
> can use the macro as well to provide such implementation for their own
> locking type.
>
> Co-developed: Peter Zijlstra <peterz@infradead.org>
> Signed-off-by: Alexander Aring <aahringo@redhat.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
next prev parent reply other threads:[~2023-11-09 9:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-06 19:11 [PATCH 1/3] refcount: move kdoc to header definition Alexander Aring
2023-11-06 19:11 ` [PATCH 2/3] refcount: introduce __refcount_dec_and_lock macro Alexander Aring
2023-11-09 9:31 ` Peter Zijlstra [this message]
2023-11-06 19:11 ` [PATCH 3/3] kref: introduce __kref_put_lock macro Alexander Aring
2023-11-09 7:01 ` [PATCH 1/3] refcount: move kdoc to header definition Christoph Hellwig
2023-11-09 14:15 ` Alexander Aring
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=20231109093152.GS8262@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=aahringo@redhat.com \
--cc=boqun.feng@gmail.com \
--cc=gfs2@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=will@kernel.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).