linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/mm_init.c: remove free_area_init_memoryless_node()
@ 2023-05-28  4:57 Haifeng Xu
  2023-05-29  9:04 ` Mike Rapoport
  0 siblings, 1 reply; 3+ messages in thread
From: Haifeng Xu @ 2023-05-28  4:57 UTC (permalink / raw)
  To: rppt; +Cc: akpm, linux-mm, linux-kernel, Haifeng Xu

free_area_init_memoryless_node() is just a wrapper of
free_area_init_node(), remove it to clean up.

Signed-off-by: Haifeng Xu <haifeng.xu@shopee.com>
---
 mm/mm_init.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/mm/mm_init.c b/mm/mm_init.c
index 2d91bb52c619..93821824271a 100644
--- a/mm/mm_init.c
+++ b/mm/mm_init.c
@@ -1752,11 +1752,6 @@ void __init setup_nr_node_ids(void)
 }
 #endif
 
-static void __init free_area_init_memoryless_node(int nid)
-{
-	free_area_init_node(nid);
-}
-
 /*
  * Some architectures, e.g. ARC may have ZONE_HIGHMEM below ZONE_NORMAL. For
  * such cases we allow max_zone_pfn sorted in the descending order
@@ -1867,7 +1862,7 @@ void __init free_area_init(unsigned long *max_zone_pfn)
 				panic("Cannot allocate %zuB for node %d.\n",
 				       sizeof(*pgdat), nid);
 			arch_refresh_nodedata(nid, pgdat);
-			free_area_init_memoryless_node(nid);
+			free_area_init_node(nid);
 
 			/*
 			 * We do not want to confuse userspace by sysfs
-- 
2.25.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm/mm_init.c: remove free_area_init_memoryless_node()
  2023-05-28  4:57 [PATCH] mm/mm_init.c: remove free_area_init_memoryless_node() Haifeng Xu
@ 2023-05-29  9:04 ` Mike Rapoport
  2023-05-29 11:58   ` Michal Hocko
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Rapoport @ 2023-05-29  9:04 UTC (permalink / raw)
  To: Haifeng Xu; +Cc: akpm, linux-mm, linux-kernel, Michal Hocko

(added Michal)

On Sun, May 28, 2023 at 04:57:20AM +0000, Haifeng Xu wrote:
> free_area_init_memoryless_node() is just a wrapper of
> free_area_init_node(), remove it to clean up.
> 
> Signed-off-by: Haifeng Xu <haifeng.xu@shopee.com>
> ---
>  mm/mm_init.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/mm/mm_init.c b/mm/mm_init.c
> index 2d91bb52c619..93821824271a 100644
> --- a/mm/mm_init.c
> +++ b/mm/mm_init.c
> @@ -1752,11 +1752,6 @@ void __init setup_nr_node_ids(void)
>  }
>  #endif
>  
> -static void __init free_area_init_memoryless_node(int nid)
> -{
> -	free_area_init_node(nid);
> -}
> -
>  /*
>   * Some architectures, e.g. ARC may have ZONE_HIGHMEM below ZONE_NORMAL. For
>   * such cases we allow max_zone_pfn sorted in the descending order
> @@ -1867,7 +1862,7 @@ void __init free_area_init(unsigned long *max_zone_pfn)
>  				panic("Cannot allocate %zuB for node %d.\n",
>  				       sizeof(*pgdat), nid);
>  			arch_refresh_nodedata(nid, pgdat);
> -			free_area_init_memoryless_node(nid);
> +			free_area_init_node(nid);

Using a dedicated free_area_init_memoryless_node() wrapper here emphasizes
that the node has no memory, but I don't have a strong feeling about
keeping it.

>  
>  			/*
>  			 * We do not want to confuse userspace by sysfs
> -- 
> 2.25.1
> 

-- 
Sincerely yours,
Mike.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm/mm_init.c: remove free_area_init_memoryless_node()
  2023-05-29  9:04 ` Mike Rapoport
@ 2023-05-29 11:58   ` Michal Hocko
  0 siblings, 0 replies; 3+ messages in thread
From: Michal Hocko @ 2023-05-29 11:58 UTC (permalink / raw)
  To: Mike Rapoport; +Cc: Haifeng Xu, akpm, linux-mm, linux-kernel

On Mon 29-05-23 12:04:46, Mike Rapoport wrote:
> (added Michal)
> 
> On Sun, May 28, 2023 at 04:57:20AM +0000, Haifeng Xu wrote:
> > free_area_init_memoryless_node() is just a wrapper of
> > free_area_init_node(), remove it to clean up.
> > 
> > Signed-off-by: Haifeng Xu <haifeng.xu@shopee.com>
> > ---
> >  mm/mm_init.c | 7 +------
> >  1 file changed, 1 insertion(+), 6 deletions(-)
> > 
> > diff --git a/mm/mm_init.c b/mm/mm_init.c
> > index 2d91bb52c619..93821824271a 100644
> > --- a/mm/mm_init.c
> > +++ b/mm/mm_init.c
> > @@ -1752,11 +1752,6 @@ void __init setup_nr_node_ids(void)
> >  }
> >  #endif
> >  
> > -static void __init free_area_init_memoryless_node(int nid)
> > -{
> > -	free_area_init_node(nid);
> > -}
> > -
> >  /*
> >   * Some architectures, e.g. ARC may have ZONE_HIGHMEM below ZONE_NORMAL. For
> >   * such cases we allow max_zone_pfn sorted in the descending order
> > @@ -1867,7 +1862,7 @@ void __init free_area_init(unsigned long *max_zone_pfn)
> >  				panic("Cannot allocate %zuB for node %d.\n",
> >  				       sizeof(*pgdat), nid);
> >  			arch_refresh_nodedata(nid, pgdat);
> > -			free_area_init_memoryless_node(nid);
> > +			free_area_init_node(nid);
> 
> Using a dedicated free_area_init_memoryless_node() wrapper here emphasizes
> that the node has no memory, but I don't have a strong feeling about
> keeping it.

Honestly, I do not think it has any added value anymore. Some time ago
it was a list of special parameters and aliasing that made some sense at
least. Maybe that could be carved into the changelog in some form.

Acked-by: Michal Hocko <mhocko@suse.com>

> 
> >  
> >  			/*
> >  			 * We do not want to confuse userspace by sysfs
> > -- 
> > 2.25.1
> > 
> 
> -- 
> Sincerely yours,
> Mike.

-- 
Michal Hocko
SUSE Labs


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-05-29 11:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-28  4:57 [PATCH] mm/mm_init.c: remove free_area_init_memoryless_node() Haifeng Xu
2023-05-29  9:04 ` Mike Rapoport
2023-05-29 11:58   ` Michal Hocko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox