projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8014c46
)
slub: use folio APIs in free_large_kmalloc()
author
Matthew Wilcox (Oracle)
<willy@infradead.org>
Thu, 28 Dec 2023 08:57:45 +0000
(08:57 +0000)
committer
Andrew Morton
<akpm@linux-foundation.org>
Fri, 5 Jan 2024 18:17:46 +0000
(10:17 -0800)
Save a few calls to compound_head() by using the folio APIs directly.
Link:
https://lkml.kernel.org/r/20231228085748.1083901-4-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: David Rientjes <rientjes@google.com>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/slab_common.c
patch
|
blob
|
history
diff --git
a/mm/slab_common.c
b/mm/slab_common.c
index 8d431193c27360716b153a403660d77865bcaf28..66f0b35318000a26feae5275b2b067218c14a283 100644
(file)
--- a/
mm/slab_common.c
+++ b/
mm/slab_common.c
@@
-979,9
+979,9
@@
void free_large_kmalloc(struct folio *folio, void *object)
kasan_kfree_large(object);
kmsan_kfree_large(object);
-
mod_lruvec_page_state(folio_page(folio, 0)
, NR_SLAB_UNRECLAIMABLE_B,
+
lruvec_stat_mod_folio(folio
, NR_SLAB_UNRECLAIMABLE_B,
-(PAGE_SIZE << order));
-
__free_pages(folio_page(folio, 0), order
);
+
folio_put(folio
);
}
static void *__kmalloc_large_node(size_t size, gfp_t flags, int node);