Message ID | 20220207133643.23427-2-linmiaohe@huawei.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | A few cleanup patches around memory_hotplug | expand |
On 07.02.22 14:36, Miaohe Lin wrote: > Since commit f1dd2cd13c4b ("mm, memory_hotplug: do not associate hotadded > memory to zones until online"), there is no need to pass in the zone. > > Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> > --- > mm/memory_hotplug.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c > index a4f69d399929..cbc67c27e0dd 100644 > --- a/mm/memory_hotplug.c > +++ b/mm/memory_hotplug.c > @@ -296,10 +296,7 @@ struct page *pfn_to_online_page(unsigned long pfn) > EXPORT_SYMBOL_GPL(pfn_to_online_page); > > /* > - * Reasonably generic function for adding memory. It is > - * expected that archs that support memory hotplug will > - * call this function after deciding the zone to which to > - * add the new pages. > + * Reasonably generic function for adding memory. > */ > int __ref __add_pages(int nid, unsigned long pfn, unsigned long nr_pages, > struct mhp_params *params) I'd suggest just removing the comment completely.
On Mon, 7 Feb 2022 15:41:21 +0100 David Hildenbrand <david@redhat.com> wrote: > On 07.02.22 14:36, Miaohe Lin wrote: > > Since commit f1dd2cd13c4b ("mm, memory_hotplug: do not associate hotadded > > memory to zones until online"), there is no need to pass in the zone. > > > > Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> > > --- > > mm/memory_hotplug.c | 5 +---- > > 1 file changed, 1 insertion(+), 4 deletions(-) > > > > diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c > > index a4f69d399929..cbc67c27e0dd 100644 > > --- a/mm/memory_hotplug.c > > +++ b/mm/memory_hotplug.c > > @@ -296,10 +296,7 @@ struct page *pfn_to_online_page(unsigned long pfn) > > EXPORT_SYMBOL_GPL(pfn_to_online_page); > > > > /* > > - * Reasonably generic function for adding memory. It is > > - * expected that archs that support memory hotplug will > > - * call this function after deciding the zone to which to > > - * add the new pages. > > + * Reasonably generic function for adding memory. > > */ > > int __ref __add_pages(int nid, unsigned long pfn, unsigned long nr_pages, > > struct mhp_params *params) > > I'd suggest just removing the comment completely. Thanks, I made that change. A better site for documentation is at add_memory(). Which, as a full-on exported-to-modules API function, should really have some docs...
On Mon, Feb 07, 2022 at 09:36:40PM +0800, Miaohe Lin wrote: > Since commit f1dd2cd13c4b ("mm, memory_hotplug: do not associate hotadded > memory to zones until online"), there is no need to pass in the zone. > > Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Yeah, I am with David here, "Reasonably generic function for adding memory" does not really tell me much about that function.
On 2022/2/8 18:15, Oscar Salvador wrote: > On Mon, Feb 07, 2022 at 09:36:40PM +0800, Miaohe Lin wrote: >> Since commit f1dd2cd13c4b ("mm, memory_hotplug: do not associate hotadded >> memory to zones until online"), there is no need to pass in the zone. >> >> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> > > Yeah, I am with David here, "Reasonably generic function for adding > memory" does not really tell me much about that function. > Agree with you. And Andrew have kindly made that change. Many thanks for your review. :)
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index a4f69d399929..cbc67c27e0dd 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -296,10 +296,7 @@ struct page *pfn_to_online_page(unsigned long pfn) EXPORT_SYMBOL_GPL(pfn_to_online_page); /* - * Reasonably generic function for adding memory. It is - * expected that archs that support memory hotplug will - * call this function after deciding the zone to which to - * add the new pages. + * Reasonably generic function for adding memory. */ int __ref __add_pages(int nid, unsigned long pfn, unsigned long nr_pages, struct mhp_params *params)
Since commit f1dd2cd13c4b ("mm, memory_hotplug: do not associate hotadded memory to zones until online"), there is no need to pass in the zone. Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> --- mm/memory_hotplug.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)