From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,tj@kernel.org,willy@infradead.org,akpm@linux-foundation.org
Subject: [merged mm-stable] percpu_ref-fix-documentation-of-maximum-value.patch removed from -mm tree
Date: Tue, 28 Jul 2026 21:14:12 -0700 [thread overview]
Message-ID: <20260729041412.795FF1F00A3A@smtp.kernel.org> (raw)
The quilt patch titled
Subject: percpu_ref: fix documentation of maximum value
has been removed from the -mm tree. Its filename was
percpu_ref-fix-documentation-of-maximum-value.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Subject: percpu_ref: fix documentation of maximum value
Date: Wed, 11 Dec 2024 20:40:14 +0000
Tejun changd percpu_ref to use long instead of int back in 2014 but missed
updating this bit of the documentation. Also add the documentation to the
htmldocs.
Link: https://lore.kernel.org/20241211204017.184512-1-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
Documentation/driver-api/basics.rst | 3 +++
include/linux/percpu-refcount.h | 5 +++--
lib/percpu-refcount.c | 2 +-
3 files changed, 7 insertions(+), 3 deletions(-)
--- a/Documentation/driver-api/basics.rst~percpu_ref-fix-documentation-of-maximum-value
+++ a/Documentation/driver-api/basics.rst
@@ -90,6 +90,9 @@ Reference counting
.. kernel-doc:: lib/refcount.c
:export:
+.. kernel-doc:: include/linux/percpu-refcount.h
+.. kernel-doc:: lib/percpu-refcount.c
+
Atomics
-------
--- a/include/linux/percpu-refcount.h~percpu_ref-fix-documentation-of-maximum-value
+++ a/include/linux/percpu-refcount.h
@@ -12,8 +12,8 @@
* start shutting down you call percpu_ref_kill() _before_ dropping the initial
* refcount.
*
- * The refcount will have a range of 0 to ((1U << 31) - 1), i.e. one bit less
- * than an atomic_t - this is because of the way shutdown works, see
+ * The refcount will have a range of 0 to LONG_MAX, i.e. one bit less
+ * than an atomic_long_t - this is because of the way shutdown works, see
* percpu_ref_kill()/PERCPU_COUNT_BIAS.
*
* Before you call percpu_ref_kill(), percpu_ref_put() does not check for the
@@ -269,6 +269,7 @@ static inline bool percpu_ref_tryget(str
/**
* percpu_ref_tryget_live_rcu - same as percpu_ref_tryget_live() but the
* caller is responsible for taking RCU.
+ * @ref: percpu_ref to try-get
*
* This function is safe to call as long as @ref is between init and exit.
*/
--- a/lib/percpu-refcount.c~percpu_ref-fix-documentation-of-maximum-value
+++ a/lib/percpu-refcount.c
@@ -289,7 +289,7 @@ static void __percpu_ref_switch_mode(str
* @confirm_switch: optional confirmation callback
*
* There's no reason to use this function for the usual reference counting.
- * Use percpu_ref_kill[_and_confirm]().
+ * Use percpu_ref_kill() or percpu_ref_kill_and_confirm().
*
* Schedule switching of @ref to atomic mode. All its percpu counts will
* be collected to the main atomic counter. On completion, when all CPUs
_
Patches currently in -mm which might be from willy@infradead.org are
reply other threads:[~2026-07-29 4:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260729041412.795FF1F00A3A@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=mm-commits@vger.kernel.org \
--cc=tj@kernel.org \
--cc=willy@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.