* [merged mm-nonmm-stable] llist-make-llist_add_batch-a-static-inline.patch removed from -mm tree
@ 2025-05-28 2:40 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-05-28 2:40 UTC (permalink / raw)
To: mm-commits, axboe, akpm
The quilt patch titled
Subject: llist: make llist_add_batch() a static inline
has been removed from the -mm tree. Its filename was
llist-make-llist_add_batch-a-static-inline.patch
This patch was dropped because it was merged into the mm-nonmm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Jens Axboe <axboe@kernel.dk>
Subject: llist: make llist_add_batch() a static inline
Date: Fri, 23 May 2025 13:13:11 -0600
The function is small enough that it should be, and it's a (very) hot path
for io_uring. Doing this actually reduces my vmlinux text size for my
standard build/test box.
Before:
axboe@r7625 ~/g/linux (test)> size vmlinux
text data bss dec hex filename
19892174 5938310 2470432 28300916 1afd674 vmlinux
After:
axboe@r7625 ~/g/linux (test)> size vmlinux
text data bss dec hex filename
19891878 5938310 2470436 28300624 1afd550 vmlinux
Link: https://lkml.kernel.org/r/f1d104c6-7ac8-457a-a53d-6bb741421b2f@kernel.dk
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/llist.h | 23 ++++++++++++++++++++---
lib/llist.c | 22 ----------------------
2 files changed, 20 insertions(+), 25 deletions(-)
--- a/include/linux/llist.h~llist-make-llist_add_batch-a-static-inline
+++ a/include/linux/llist.h
@@ -223,9 +223,26 @@ static inline struct llist_node *llist_n
return node->next;
}
-extern bool llist_add_batch(struct llist_node *new_first,
- struct llist_node *new_last,
- struct llist_head *head);
+/**
+ * llist_add_batch - add several linked entries in batch
+ * @new_first: first entry in batch to be added
+ * @new_last: last entry in batch to be added
+ * @head: the head for your lock-less list
+ *
+ * Return whether list is empty before adding.
+ */
+static inline bool llist_add_batch(struct llist_node *new_first,
+ struct llist_node *new_last,
+ struct llist_head *head)
+{
+ struct llist_node *first = READ_ONCE(head->first);
+
+ do {
+ new_last->next = first;
+ } while (!try_cmpxchg(&head->first, &first, new_first));
+
+ return !first;
+}
static inline bool __llist_add_batch(struct llist_node *new_first,
struct llist_node *new_last,
--- a/lib/llist.c~llist-make-llist_add_batch-a-static-inline
+++ a/lib/llist.c
@@ -14,28 +14,6 @@
#include <linux/export.h>
#include <linux/llist.h>
-
-/**
- * llist_add_batch - add several linked entries in batch
- * @new_first: first entry in batch to be added
- * @new_last: last entry in batch to be added
- * @head: the head for your lock-less list
- *
- * Return whether list is empty before adding.
- */
-bool llist_add_batch(struct llist_node *new_first, struct llist_node *new_last,
- struct llist_head *head)
-{
- struct llist_node *first = READ_ONCE(head->first);
-
- do {
- new_last->next = first;
- } while (!try_cmpxchg(&head->first, &first, new_first));
-
- return !first;
-}
-EXPORT_SYMBOL_GPL(llist_add_batch);
-
/**
* llist_del_first - delete the first entry of lock-less list
* @head: the head for your lock-less list
_
Patches currently in -mm which might be from axboe@kernel.dk are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-05-28 2:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-28 2:40 [merged mm-nonmm-stable] llist-make-llist_add_batch-a-static-inline.patch removed from -mm tree Andrew Morton
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.