Re: [PATCH v2] mm/slub.c: replace kmem_cache->cpu_partial with wrapped APIs

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

 



On Wed, 19 Feb 2020, qiwuchen55@xxxxxxxxx wrote:

> diff --git a/mm/slub.c b/mm/slub.c
> index 17dc00e..1eb888c 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -2284,7 +2284,7 @@ static void put_cpu_partial(struct kmem_cache *s, struct page *page, int drain)
>  		if (oldpage) {
>  			pobjects = oldpage->pobjects;
>  			pages = oldpage->pages;
> -			if (drain && pobjects > s->cpu_partial) {
> +			if (drain && pobjects > slub_cpu_partial(s)) {
>  				unsigned long flags;
>  				/*
>  				 * partial array is full. Move the existing

Maybe its better to not generate code for put_cpu_partial() instead of
using macros there if per cpu partials are disabled?





[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