Message ID | 20231228085748.1083901-4-willy@infradead.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Remove some lruvec page accounting functions | expand |
On Thu, 28 Dec 2023, Matthew Wilcox (Oracle) wrote: > Save a few calls to compound_head() by using the folio APIs > directly. > > Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Acked-by: David Rientjes <rientjes@google.com>
On 12/28/23 09:57, Matthew Wilcox (Oracle) wrote: > Save a few calls to compound_head() by using the folio APIs > directly. > > Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Vlastimil Babka <vbabka@suse.cz> > --- > mm/slub.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/mm/slub.c b/mm/slub.c > index 342545775df6..58b4936f2a29 100644 > --- a/mm/slub.c > +++ b/mm/slub.c > @@ -4375,9 +4375,9 @@ static 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); > } > > /**
diff --git a/mm/slub.c b/mm/slub.c index 342545775df6..58b4936f2a29 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -4375,9 +4375,9 @@ static 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); } /**
Save a few calls to compound_head() by using the folio APIs directly. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> --- mm/slub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)