Re: [PATCH v2 3/6] slub: Use folio APIs in free_large_kmalloc()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>

Reviewed-by: Vlastimil Babka <vbabka@xxxxxxx>

> ---
>  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);
>  }
>  
>  /**





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux