mbox series

[0/5] mm/vmalloc.c: code cleanup and improvements

Message ID 20250415023952.27850-1-bhe@redhat.com (mailing list archive)
Headers show
Series mm/vmalloc.c: code cleanup and improvements | expand

Message

Baoquan He April 15, 2025, 2:39 a.m. UTC
These were made from code inspection in mm/vmalloc.c.

Baoquan He (5):
  mm/vmalloc.c: change purge_ndoes as local static variable
  mm/vmalloc.c: find the vmap of vmap_nodes in reverse order
  mm/vmalloc.c: optimize code in decay_va_pool_node() a little bit
  mm/vmalloc: optimize function vm_unmap_aliases()
  mm/vmalloc.c: return explicit error value in alloc_vmap_area()

 mm/vmalloc.c | 68 +++++++++++++++++++++++++---------------------------
 1 file changed, 32 insertions(+), 36 deletions(-)

Comments

Uladzislau Rezki (Sony) April 15, 2025, 3:29 p.m. UTC | #1
On Tue, Apr 15, 2025 at 10:39:47AM +0800, Baoquan He wrote:
> These were made from code inspection in mm/vmalloc.c.
> 
> Baoquan He (5):
>   mm/vmalloc.c: change purge_ndoes as local static variable
>   mm/vmalloc.c: find the vmap of vmap_nodes in reverse order
>   mm/vmalloc.c: optimize code in decay_va_pool_node() a little bit
>   mm/vmalloc: optimize function vm_unmap_aliases()
>   mm/vmalloc.c: return explicit error value in alloc_vmap_area()
> 
>  mm/vmalloc.c | 68 +++++++++++++++++++++++++---------------------------
>  1 file changed, 32 insertions(+), 36 deletions(-)
> 
> -- 
> 2.41.0
> 
I have review some patches, the rest i will check tomorrow!

--
Uladzislau Rezki
Shivank Garg April 15, 2025, 7:06 p.m. UTC | #2
On 4/15/2025 8:09 AM, Baoquan He wrote:
> These were made from code inspection in mm/vmalloc.c.
> 
> Baoquan He (5):
>   mm/vmalloc.c: change purge_ndoes as local static variable
>   mm/vmalloc.c: find the vmap of vmap_nodes in reverse order
>   mm/vmalloc.c: optimize code in decay_va_pool_node() a little bit
>   mm/vmalloc: optimize function vm_unmap_aliases()
>   mm/vmalloc.c: return explicit error value in alloc_vmap_area()
> 
>  mm/vmalloc.c | 68 +++++++++++++++++++++++++---------------------------
>  1 file changed, 32 insertions(+), 36 deletions(-)
> 

I've tested this patch-series on my AMD EPYC ZEN 3 machine using

1. Using lib/test_vmalloc.c: modprobe test_vmalloc
2. stress-ng: stress-ng --class memory,vm  --seq 0

I did not find any issues.

Reviewed-by: Shivank Garg <shivankg@amd.com>
Tested-by: Shivank Garg <shivankg@amd.com>

Thanks,
Shivank
Baoquan He April 15, 2025, 10:55 p.m. UTC | #3
On 04/15/25 at 05:29pm, Uladzislau Rezki wrote:
> On Tue, Apr 15, 2025 at 10:39:47AM +0800, Baoquan He wrote:
> > These were made from code inspection in mm/vmalloc.c.
> > 
> > Baoquan He (5):
> >   mm/vmalloc.c: change purge_ndoes as local static variable
> >   mm/vmalloc.c: find the vmap of vmap_nodes in reverse order
> >   mm/vmalloc.c: optimize code in decay_va_pool_node() a little bit
> >   mm/vmalloc: optimize function vm_unmap_aliases()
> >   mm/vmalloc.c: return explicit error value in alloc_vmap_area()
> > 
> >  mm/vmalloc.c | 68 +++++++++++++++++++++++++---------------------------
> >  1 file changed, 32 insertions(+), 36 deletions(-)
> > 
> > -- 
> > 2.41.0
> > 
> I have review some patches, the rest i will check tomorrow!

Thanks a lot for your quick and careful reviewing.