[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211012180148.1669685-10-hannes@cmpxchg.org>
Date: Tue, 12 Oct 2021 14:01:46 -0400
From: Johannes Weiner <hannes@...xchg.org>
To: linux-mm@...ck.org
Cc: Matthew Wilcox <willy@...radead.org>,
Kent Overstreet <kent.overstreet@...il.com>,
"Kirill A. Shutemov" <kirill@...temov.name>,
Vlastimil Babka <vbabka@...e.cz>,
Michal Hocko <mhocko@...e.com>, Roman Gushchin <guro@...com>,
linux-kernel@...r.kernel.org, kernel-team@...com
Subject: [PATCH 09/11] PageSlab: eliminate unnecessary compound_head() calls in mm/slub
virt_to_head_page() implies it.
Signed-off-by: Johannes Weiner <hannes@...xchg.org>
---
mm/slub.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mm/slub.c b/mm/slub.c
index 37a4cc1e73a7..d1bd004c8c2f 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -3554,7 +3554,7 @@ int build_detached_freelist(struct kmem_cache *s, size_t size,
page = virt_to_head_page(object);
if (!s) {
/* Handle kalloc'ed objects */
- if (unlikely(!PageSlab(compound_head(page)))) {
+ if (unlikely(!PageSlab(page))) {
free_nonslab_page(page, object);
p[size] = NULL; /* mark object processed */
return size;
@@ -4516,7 +4516,7 @@ size_t __ksize(const void *object)
page = virt_to_head_page(object);
- if (unlikely(!PageSlab(compound_head(page)))) {
+ if (unlikely(!PageSlab(page))) {
WARN_ON(!PageCompound(page));
return page_size(page);
}
@@ -4536,7 +4536,7 @@ void kfree(const void *x)
return;
page = virt_to_head_page(x);
- if (unlikely(!PageSlab(compound_head(page)))) {
+ if (unlikely(!PageSlab(page))) {
free_nonslab_page(page, object);
return;
}
--
2.32.0
Powered by blists - more mailing lists