linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] mm/hugetlb: convert dissolve_free_huge_pages() to folios
@ 2024-04-12 18:21 Sidhartha Kumar
  2024-04-12 18:21 ` [PATCH v2 2/2] mm/hugetlb: rename dissolve_free_huge_pages() to dissolve_free_hugetlb_folios() Sidhartha Kumar
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Sidhartha Kumar @ 2024-04-12 18:21 UTC (permalink / raw)
  To: linux-kernel, linux-mm
  Cc: akpm, willy, linmiaohe, jane.chu, muchun.song, nao.horiguchi,
	osalvador, Sidhartha Kumar

Allows us to rename dissolve_free_huge_pages() to
dissolve_free_hugetlb_folio(). Convert one caller to pass in a folio
directly and use page_folio() to convert the caller in mm/memory-failure.

Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Reviewed-by: Oscar Salvador <osalvador@suse.de>
---

v1 -> v2:
	- Change additional comments which reference hugepages to
	  hugetlb folios per Miaohe Lin. 
	- introduce patch 2

 include/linux/hugetlb.h |  4 ++--
 mm/hugetlb.c            | 17 ++++++++---------
 mm/memory-failure.c     |  8 ++++----
 3 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 3f3e628802792..f4191b10345d6 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -861,7 +861,7 @@ static inline int hstate_index(struct hstate *h)
 	return h - hstates;
 }
 
-extern int dissolve_free_huge_page(struct page *page);
+extern int dissolve_free_hugetlb_folio(struct folio *folio);
 extern int dissolve_free_huge_pages(unsigned long start_pfn,
 				    unsigned long end_pfn);
 
@@ -1148,7 +1148,7 @@ static inline int hstate_index(struct hstate *h)
 	return 0;
 }
 
-static inline int dissolve_free_huge_page(struct page *page)
+static inline int dissolve_free_hugetlb_folio(struct folio *folio)
 {
 	return 0;
 }
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 454900c84b303..f6dd5f597df16 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -2377,8 +2377,8 @@ static struct folio *remove_pool_hugetlb_folio(struct hstate *h,
 }
 
 /*
- * Dissolve a given free hugepage into free buddy pages. This function does
- * nothing for in-use hugepages and non-hugepages.
+ * Dissolve a given free hugetlb folio into free buddy pages. This function
+ * does nothing for in-use hugetlb folios and non-hugetlb folios.
  * This function returns values like below:
  *
  *  -ENOMEM: failed to allocate vmemmap pages to free the freed hugepages
@@ -2390,10 +2390,9 @@ static struct folio *remove_pool_hugetlb_folio(struct hstate *h,
  *       0:  successfully dissolved free hugepages or the page is not a
  *           hugepage (considered as already dissolved)
  */
-int dissolve_free_huge_page(struct page *page)
+int dissolve_free_hugetlb_folio(struct folio *folio)
 {
 	int rc = -EBUSY;
-	struct folio *folio = page_folio(page);
 
 retry:
 	/* Not to disrupt normal path by vainly holding hugetlb_lock */
@@ -2470,13 +2469,13 @@ int dissolve_free_huge_page(struct page *page)
  * make specified memory blocks removable from the system.
  * Note that this will dissolve a free gigantic hugepage completely, if any
  * part of it lies within the given range.
- * Also note that if dissolve_free_huge_page() returns with an error, all
- * free hugepages that were dissolved before that error are lost.
+ * Also note that if dissolve_free_hugetlb_folio() returns with an error, all
+ * free hugetlb folios that were dissolved before that error are lost.
  */
 int dissolve_free_huge_pages(unsigned long start_pfn, unsigned long end_pfn)
 {
 	unsigned long pfn;
-	struct page *page;
+	struct folio *folio;
 	int rc = 0;
 	unsigned int order;
 	struct hstate *h;
@@ -2489,8 +2488,8 @@ int dissolve_free_huge_pages(unsigned long start_pfn, unsigned long end_pfn)
 		order = min(order, huge_page_order(h));
 
 	for (pfn = start_pfn; pfn < end_pfn; pfn += 1 << order) {
-		page = pfn_to_page(pfn);
-		rc = dissolve_free_huge_page(page);
+		folio = pfn_folio(pfn);
+		rc = dissolve_free_hugetlb_folio(folio);
 		if (rc)
 			break;
 	}
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 88359a185c5f9..8cc91aa1a3f47 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -155,11 +155,11 @@ static int __page_handle_poison(struct page *page)
 
 	/*
 	 * zone_pcp_disable() can't be used here. It will hold pcp_batch_high_lock and
-	 * dissolve_free_huge_page() might hold cpu_hotplug_lock via static_key_slow_dec()
+	 * dissolve_free_hugetlb_folio() might hold cpu_hotplug_lock via static_key_slow_dec()
 	 * when hugetlb vmemmap optimization is enabled. This will break current lock
 	 * dependency chain and leads to deadlock.
 	 */
-	ret = dissolve_free_huge_page(page);
+	ret = dissolve_free_hugetlb_folio(page_folio(page));
 	if (!ret) {
 		drain_all_pages(page_zone(page));
 		ret = take_page_off_buddy(page);
@@ -172,8 +172,8 @@ static bool page_handle_poison(struct page *page, bool hugepage_or_freepage, boo
 {
 	if (hugepage_or_freepage) {
 		/*
-		 * Doing this check for free pages is also fine since dissolve_free_huge_page
-		 * returns 0 for non-hugetlb pages as well.
+		 * Doing this check for free pages is also fine since
+		 * dissolve_free_hugetlb_folio() returns 0 for non-hugetlb folios as well.
 		 */
 		if (__page_handle_poison(page) <= 0)
 			/*
-- 
2.44.0



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

* [PATCH v2 2/2] mm/hugetlb: rename dissolve_free_huge_pages() to dissolve_free_hugetlb_folios()
  2024-04-12 18:21 [PATCH v2 1/2] mm/hugetlb: convert dissolve_free_huge_pages() to folios Sidhartha Kumar
@ 2024-04-12 18:21 ` Sidhartha Kumar
  2024-04-15 18:32   ` Vishal Moola
  2024-04-16  9:18   ` Miaohe Lin
  2024-04-15 18:28 ` [PATCH v2 1/2] mm/hugetlb: convert dissolve_free_huge_pages() to folios Vishal Moola
  2024-04-16  9:18 ` Miaohe Lin
  2 siblings, 2 replies; 9+ messages in thread
From: Sidhartha Kumar @ 2024-04-12 18:21 UTC (permalink / raw)
  To: linux-kernel, linux-mm
  Cc: akpm, willy, linmiaohe, jane.chu, muchun.song, nao.horiguchi,
	osalvador, Sidhartha Kumar

dissolve_free_huge_pages() only uses folios internally, rename it to
dissolve_free_hugetlb_folios() and change the comments which reference it.

Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
---
 include/linux/hugetlb.h | 4 ++--
 mm/hugetlb.c            | 2 +-
 mm/memory_hotplug.c     | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index f4191b10345d6..9ad7b97069cda 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -862,7 +862,7 @@ static inline int hstate_index(struct hstate *h)
 }
 
 extern int dissolve_free_hugetlb_folio(struct folio *folio);
-extern int dissolve_free_huge_pages(unsigned long start_pfn,
+extern int dissolve_free_hugetlb_folios(unsigned long start_pfn,
 				    unsigned long end_pfn);
 
 #ifdef CONFIG_MEMORY_FAILURE
@@ -1153,7 +1153,7 @@ static inline int dissolve_free_hugetlb_folio(struct folio *folio)
 	return 0;
 }
 
-static inline int dissolve_free_huge_pages(unsigned long start_pfn,
+static inline int dissolve_free_hugetlb_folios(unsigned long start_pfn,
 					   unsigned long end_pfn)
 {
 	return 0;
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index f6dd5f597df16..51665b20d90f9 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -2472,7 +2472,7 @@ int dissolve_free_hugetlb_folio(struct folio *folio)
  * Also note that if dissolve_free_hugetlb_folio() returns with an error, all
  * free hugetlb folios that were dissolved before that error are lost.
  */
-int dissolve_free_huge_pages(unsigned long start_pfn, unsigned long end_pfn)
+int dissolve_free_hugetlb_folios(unsigned long start_pfn, unsigned long end_pfn)
 {
 	unsigned long pfn;
 	struct folio *folio;
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index b79ba36e09e03..431b1f6753c0b 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -2051,11 +2051,11 @@ int __ref offline_pages(unsigned long start_pfn, unsigned long nr_pages,
 		}
 
 		/*
-		 * Dissolve free hugepages in the memory block before doing
+		 * Dissolve free hugetlb folios in the memory block before doing
 		 * offlining actually in order to make hugetlbfs's object
 		 * counting consistent.
 		 */
-		ret = dissolve_free_huge_pages(start_pfn, end_pfn);
+		ret = dissolve_free_hugetlb_folios(start_pfn, end_pfn);
 		if (ret) {
 			reason = "failure to dissolve huge pages";
 			goto failed_removal_isolated;
-- 
2.44.0



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

* Re: [PATCH v2 1/2] mm/hugetlb: convert dissolve_free_huge_pages() to folios
  2024-04-12 18:21 [PATCH v2 1/2] mm/hugetlb: convert dissolve_free_huge_pages() to folios Sidhartha Kumar
  2024-04-12 18:21 ` [PATCH v2 2/2] mm/hugetlb: rename dissolve_free_huge_pages() to dissolve_free_hugetlb_folios() Sidhartha Kumar
@ 2024-04-15 18:28 ` Vishal Moola
  2024-04-15 19:06   ` Sidhartha Kumar
  2024-04-16  9:18 ` Miaohe Lin
  2 siblings, 1 reply; 9+ messages in thread
From: Vishal Moola @ 2024-04-15 18:28 UTC (permalink / raw)
  To: Sidhartha Kumar
  Cc: linux-kernel, linux-mm, akpm, willy, linmiaohe, jane.chu,
	muchun.song, nao.horiguchi, osalvador

On Fri, Apr 12, 2024 at 11:21:38AM -0700, Sidhartha Kumar wrote:
> Allows us to rename dissolve_free_huge_pages() to
> dissolve_free_hugetlb_folio(). Convert one caller to pass in a folio
> directly and use page_folio() to convert the caller in mm/memory-failure.
>
> Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
> Reviewed-by: Oscar Salvador <osalvador@suse.de>
> ---
> 
> v1 -> v2:
> 	- Change additional comments which reference hugepages to
> 	  hugetlb folios per Miaohe Lin. 
> 	- introduce patch 2
> 
>  include/linux/hugetlb.h |  4 ++--
>  mm/hugetlb.c            | 17 ++++++++---------
>  mm/memory-failure.c     |  8 ++++----
>  3 files changed, 14 insertions(+), 15 deletions(-)
> 
> diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
> index 3f3e628802792..f4191b10345d6 100644
> --- a/include/linux/hugetlb.h
> +++ b/include/linux/hugetlb.h
> @@ -861,7 +861,7 @@ static inline int hstate_index(struct hstate *h)
>  	return h - hstates;
>  }
>  
> -extern int dissolve_free_huge_page(struct page *page);
> +extern int dissolve_free_hugetlb_folio(struct folio *folio);

You could drop the extern here as we don't need it anymore. Aside from that
LGTM.

Reviewed-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>


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

* Re: [PATCH v2 2/2] mm/hugetlb: rename dissolve_free_huge_pages() to dissolve_free_hugetlb_folios()
  2024-04-12 18:21 ` [PATCH v2 2/2] mm/hugetlb: rename dissolve_free_huge_pages() to dissolve_free_hugetlb_folios() Sidhartha Kumar
@ 2024-04-15 18:32   ` Vishal Moola
  2024-04-15 19:17     ` Sidhartha Kumar
  2024-04-16  9:18   ` Miaohe Lin
  1 sibling, 1 reply; 9+ messages in thread
From: Vishal Moola @ 2024-04-15 18:32 UTC (permalink / raw)
  To: Sidhartha Kumar
  Cc: linux-kernel, linux-mm, akpm, willy, linmiaohe, jane.chu,
	muchun.song, nao.horiguchi, osalvador

On Fri, Apr 12, 2024 at 11:21:39AM -0700, Sidhartha Kumar wrote:
> dissolve_free_huge_pages() only uses folios internally, rename it to
> dissolve_free_hugetlb_folios() and change the comments which reference it.
> 
> Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
> ---
>  include/linux/hugetlb.h | 4 ++--
>  mm/hugetlb.c            | 2 +-
>  mm/memory_hotplug.c     | 4 ++--
>  3 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
> index f4191b10345d6..9ad7b97069cda 100644
> --- a/include/linux/hugetlb.h
> +++ b/include/linux/hugetlb.h
> @@ -862,7 +862,7 @@ static inline int hstate_index(struct hstate *h)
>  }
>  
>  extern int dissolve_free_hugetlb_folio(struct folio *folio);
> -extern int dissolve_free_huge_pages(unsigned long start_pfn,
> +extern int dissolve_free_hugetlb_folios(unsigned long start_pfn,
>  				    unsigned long end_pfn);

Same comment as the prior patch.

Reviewed-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>


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

* Re: [PATCH v2 1/2] mm/hugetlb: convert dissolve_free_huge_pages() to folios
  2024-04-15 18:28 ` [PATCH v2 1/2] mm/hugetlb: convert dissolve_free_huge_pages() to folios Vishal Moola
@ 2024-04-15 19:06   ` Sidhartha Kumar
  2024-04-15 19:14     ` Sidhartha Kumar
  0 siblings, 1 reply; 9+ messages in thread
From: Sidhartha Kumar @ 2024-04-15 19:06 UTC (permalink / raw)
  To: Vishal Moola
  Cc: linux-kernel, linux-mm, akpm, willy, linmiaohe, jane.chu,
	muchun.song, nao.horiguchi, osalvador

On 4/15/24 11:28 AM, Vishal Moola wrote:
> On Fri, Apr 12, 2024 at 11:21:38AM -0700, Sidhartha Kumar wrote:
>> Allows us to rename dissolve_free_huge_pages() to
>> dissolve_free_hugetlb_folio(). Convert one caller to pass in a folio
>> directly and use page_folio() to convert the caller in mm/memory-failure.
>>
>> Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
>> Reviewed-by: Oscar Salvador <osalvador@suse.de>
>> ---
>>
>> v1 -> v2:
>> 	- Change additional comments which reference hugepages to
>> 	  hugetlb folios per Miaohe Lin.
>> 	- introduce patch 2
>>
>>   include/linux/hugetlb.h |  4 ++--
>>   mm/hugetlb.c            | 17 ++++++++---------
>>   mm/memory-failure.c     |  8 ++++----
>>   3 files changed, 14 insertions(+), 15 deletions(-)
>>
>> diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
>> index 3f3e628802792..f4191b10345d6 100644
>> --- a/include/linux/hugetlb.h
>> +++ b/include/linux/hugetlb.h
>> @@ -861,7 +861,7 @@ static inline int hstate_index(struct hstate *h)
>>   	return h - hstates;
>>   }
>>   
>> -extern int dissolve_free_huge_page(struct page *page);
>> +extern int dissolve_free_hugetlb_folio(struct folio *folio);
> 
> You could drop the extern here as we don't need it anymore. Aside from that
> LGTM.
> 
> Reviewed-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>
> 
Hi Andrew,

Could this diff be folded in this patch to remove the extern per Vishal.

Thanks,
Sid

diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index f4191b10345d6..4cd7895590b6c 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -862,7 +862,7 @@ static inline int hstate_index(struct hstate *h)
  }

  extern int dissolve_free_hugetlb_folio(struct folio *folio);
-extern int dissolve_free_huge_pages(unsigned long start_pfn,
+int dissolve_free_huge_pages(unsigned long start_pfn,
                                     unsigned long end_pfn);

  #ifdef CONFIG_MEMORY_FAILURE


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

* Re: [PATCH v2 1/2] mm/hugetlb: convert dissolve_free_huge_pages() to folios
  2024-04-15 19:06   ` Sidhartha Kumar
@ 2024-04-15 19:14     ` Sidhartha Kumar
  0 siblings, 0 replies; 9+ messages in thread
From: Sidhartha Kumar @ 2024-04-15 19:14 UTC (permalink / raw)
  To: Vishal Moola
  Cc: linux-kernel, linux-mm, akpm, willy, linmiaohe, jane.chu,
	muchun.song, nao.horiguchi, osalvador

On 4/15/24 12:06 PM, Sidhartha Kumar wrote:
> On 4/15/24 11:28 AM, Vishal Moola wrote:
>> On Fri, Apr 12, 2024 at 11:21:38AM -0700, Sidhartha Kumar wrote:
>>> Allows us to rename dissolve_free_huge_pages() to
>>> dissolve_free_hugetlb_folio(). Convert one caller to pass in a folio
>>> directly and use page_folio() to convert the caller in mm/memory-failure.
>>>
>>> Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
>>> Reviewed-by: Oscar Salvador <osalvador@suse.de>
>>> ---
>>>
>>> v1 -> v2:
>>>     - Change additional comments which reference hugepages to
>>>       hugetlb folios per Miaohe Lin.
>>>     - introduce patch 2
>>>
>>>   include/linux/hugetlb.h |  4 ++--
>>>   mm/hugetlb.c            | 17 ++++++++---------
>>>   mm/memory-failure.c     |  8 ++++----
>>>   3 files changed, 14 insertions(+), 15 deletions(-)
>>>
>>> diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
>>> index 3f3e628802792..f4191b10345d6 100644
>>> --- a/include/linux/hugetlb.h
>>> +++ b/include/linux/hugetlb.h
>>> @@ -861,7 +861,7 @@ static inline int hstate_index(struct hstate *h)
>>>       return h - hstates;
>>>   }
>>> -extern int dissolve_free_huge_page(struct page *page);
>>> +extern int dissolve_free_hugetlb_folio(struct folio *folio);
>>
>> You could drop the extern here as we don't need it anymore. Aside from that
>> LGTM.
>>
>> Reviewed-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>
>>
> Hi Andrew,
> 
> Could this diff be folded in this patch to remove the extern per Vishal.
> 
> Thanks,
> Sid
> 
> diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
> index f4191b10345d6..4cd7895590b6c 100644
> --- a/include/linux/hugetlb.h
> +++ b/include/linux/hugetlb.h
> @@ -862,7 +862,7 @@ static inline int hstate_index(struct hstate *h)
>   }
> 
>   extern int dissolve_free_hugetlb_folio(struct folio *folio);
> -extern int dissolve_free_huge_pages(unsigned long start_pfn,
> +int dissolve_free_huge_pages(unsigned long start_pfn,
>                                      unsigned long end_pfn);
> 
>   #ifdef CONFIG_MEMORY_FAILURE
> 

Sorry, that diff is wrong, it should be:

diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index f4191b10345d6..8968e8a3a205d 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -861,7 +861,7 @@ static inline int hstate_index(struct hstate *h)
         return h - hstates;
  }

-extern int dissolve_free_hugetlb_folio(struct folio *folio);
+int dissolve_free_hugetlb_folio(struct folio *folio);
  extern int dissolve_free_huge_pages(unsigned long start_pfn,
                                     unsigned long end_pfn);




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

* Re: [PATCH v2 2/2] mm/hugetlb: rename dissolve_free_huge_pages() to dissolve_free_hugetlb_folios()
  2024-04-15 18:32   ` Vishal Moola
@ 2024-04-15 19:17     ` Sidhartha Kumar
  0 siblings, 0 replies; 9+ messages in thread
From: Sidhartha Kumar @ 2024-04-15 19:17 UTC (permalink / raw)
  To: Vishal Moola
  Cc: linux-kernel, linux-mm, akpm, willy, linmiaohe, jane.chu,
	muchun.song, nao.horiguchi, osalvador

On 4/15/24 11:32 AM, Vishal Moola wrote:
> On Fri, Apr 12, 2024 at 11:21:39AM -0700, Sidhartha Kumar wrote:
>> dissolve_free_huge_pages() only uses folios internally, rename it to
>> dissolve_free_hugetlb_folios() and change the comments which reference it.
>>
>> Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
>> ---
>>   include/linux/hugetlb.h | 4 ++--
>>   mm/hugetlb.c            | 2 +-
>>   mm/memory_hotplug.c     | 4 ++--
>>   3 files changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
>> index f4191b10345d6..9ad7b97069cda 100644
>> --- a/include/linux/hugetlb.h
>> +++ b/include/linux/hugetlb.h
>> @@ -862,7 +862,7 @@ static inline int hstate_index(struct hstate *h)
>>   }
>>   
>>   extern int dissolve_free_hugetlb_folio(struct folio *folio);
>> -extern int dissolve_free_huge_pages(unsigned long start_pfn,
>> +extern int dissolve_free_hugetlb_folios(unsigned long start_pfn,
>>   				    unsigned long end_pfn);
> 
> Same comment as the prior patch.
> 
> Reviewed-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>
> 
Hi Andrew,

Could this diff also be folded in this patch to remove the extern per Vishal.

Thanks,
Sid

diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 9c96ef4d290a8..1bc93e7e315bb 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -862,7 +862,7 @@ static inline int hstate_index(struct hstate *h)
  }

  int dissolve_free_hugetlb_folio(struct folio *folio);
-extern int dissolve_free_hugetlb_folios(unsigned long start_pfn,
+int dissolve_free_hugetlb_folios(unsigned long start_pfn,
                                     unsigned long end_pfn);

  #ifdef CONFIG_MEMORY_FAILURE



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

* Re: [PATCH v2 1/2] mm/hugetlb: convert dissolve_free_huge_pages() to folios
  2024-04-12 18:21 [PATCH v2 1/2] mm/hugetlb: convert dissolve_free_huge_pages() to folios Sidhartha Kumar
  2024-04-12 18:21 ` [PATCH v2 2/2] mm/hugetlb: rename dissolve_free_huge_pages() to dissolve_free_hugetlb_folios() Sidhartha Kumar
  2024-04-15 18:28 ` [PATCH v2 1/2] mm/hugetlb: convert dissolve_free_huge_pages() to folios Vishal Moola
@ 2024-04-16  9:18 ` Miaohe Lin
  2 siblings, 0 replies; 9+ messages in thread
From: Miaohe Lin @ 2024-04-16  9:18 UTC (permalink / raw)
  To: Sidhartha Kumar, linux-kernel, linux-mm
  Cc: akpm, willy, jane.chu, muchun.song, nao.horiguchi, osalvador

On 2024/4/13 2:21, Sidhartha Kumar wrote:
> Allows us to rename dissolve_free_huge_pages() to
> dissolve_free_hugetlb_folio(). Convert one caller to pass in a folio
> directly and use page_folio() to convert the caller in mm/memory-failure.
> 
> Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
> Reviewed-by: Oscar Salvador <osalvador@suse.de>
> ---
> 
> v1 -> v2:
> 	- Change additional comments which reference hugepages to
> 	  hugetlb folios per Miaohe Lin. 
> 	- introduce patch 2
> 
>  include/linux/hugetlb.h |  4 ++--
>  mm/hugetlb.c            | 17 ++++++++---------
>  mm/memory-failure.c     |  8 ++++----
>  3 files changed, 14 insertions(+), 15 deletions(-)

Reviewed-by: Miaohe Lin <linmiaohe@huawei.com>
Thanks.
.


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

* Re: [PATCH v2 2/2] mm/hugetlb: rename dissolve_free_huge_pages() to dissolve_free_hugetlb_folios()
  2024-04-12 18:21 ` [PATCH v2 2/2] mm/hugetlb: rename dissolve_free_huge_pages() to dissolve_free_hugetlb_folios() Sidhartha Kumar
  2024-04-15 18:32   ` Vishal Moola
@ 2024-04-16  9:18   ` Miaohe Lin
  1 sibling, 0 replies; 9+ messages in thread
From: Miaohe Lin @ 2024-04-16  9:18 UTC (permalink / raw)
  To: Sidhartha Kumar, linux-kernel, linux-mm
  Cc: akpm, willy, jane.chu, muchun.song, nao.horiguchi, osalvador

On 2024/4/13 2:21, Sidhartha Kumar wrote:
> dissolve_free_huge_pages() only uses folios internally, rename it to
> dissolve_free_hugetlb_folios() and change the comments which reference it.
> 
> Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
> ---
>  include/linux/hugetlb.h | 4 ++--
>  mm/hugetlb.c            | 2 +-
>  mm/memory_hotplug.c     | 4 ++--
>  3 files changed, 5 insertions(+), 5 deletions(-)

Reviewed-by: Miaohe Lin <linmiaohe@huawei.com>
Thanks.
.


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

end of thread, other threads:[~2024-04-16  9:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-12 18:21 [PATCH v2 1/2] mm/hugetlb: convert dissolve_free_huge_pages() to folios Sidhartha Kumar
2024-04-12 18:21 ` [PATCH v2 2/2] mm/hugetlb: rename dissolve_free_huge_pages() to dissolve_free_hugetlb_folios() Sidhartha Kumar
2024-04-15 18:32   ` Vishal Moola
2024-04-15 19:17     ` Sidhartha Kumar
2024-04-16  9:18   ` Miaohe Lin
2024-04-15 18:28 ` [PATCH v2 1/2] mm/hugetlb: convert dissolve_free_huge_pages() to folios Vishal Moola
2024-04-15 19:06   ` Sidhartha Kumar
2024-04-15 19:14     ` Sidhartha Kumar
2024-04-16  9:18 ` Miaohe Lin

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