[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z_7xeycZwymvffbt@fedora>
Date: Tue, 15 Apr 2025 16:53:31 -0700
From: "Vishal Moola (Oracle)" <vishal.moola@...il.com>
To: Baoquan He <bhe@...hat.com>
Cc: linux-mm@...ck.org, akpm@...ux-foundation.org, urezki@...il.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/5] mm/vmalloc.c: change purge_ndoes as local static
variable
On Tue, Apr 15, 2025 at 10:39:48AM +0800, Baoquan He wrote:
> Static variable 'purge_ndoes' is defined in global scope, while it's
> only used in function __purge_vmap_area_lazy(). It mainly serves to
> avoid memory allocation repeatedly, especially when NR_CPUS is big.
>
> While a local static variable can also satisfy the demand, and can
> improve code readibility. Hence move its definition into
> __purge_vmap_area_lazy().
>
> Signed-off-by: Baoquan He <bhe@...hat.com>
Reviewed-by: Vishal Moola (Oracle) <vishal.moola@...il.com>
Powered by blists - more mailing lists