linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Removed unused argument vma from migrate_misplaced_folio
@ 2024-11-25  7:57 Donet Tom
  2024-11-26 13:58 ` Baolin Wang
  2024-11-26 14:38 ` Zi Yan
  0 siblings, 2 replies; 4+ messages in thread
From: Donet Tom @ 2024-11-25  7:57 UTC (permalink / raw)
  To: Andrew Morton, linux-mm, linux-kernel, David Hildenbrand
  Cc: Ritesh Harjani, Baolin Wang, Zi Yan

Commit ee86814b0562 ("mm/migrate: move NUMA hinting fault folio
isolation + checks under PTL") removed the code that had used
the vma argument in migrate_misplaced_folio.

Since the vma argument was no longer used in migrate_misplaced_folio,
this patch removed it.

Signed-off-by: Donet Tom <donettom@linux.ibm.com>
---
 include/linux/migrate.h | 6 ++----
 mm/huge_memory.c        | 2 +-
 mm/memory.c             | 2 +-
 mm/migrate.c            | 3 +--
 4 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/include/linux/migrate.h b/include/linux/migrate.h
index 002e49b2ebd9..29919faea2f1 100644
--- a/include/linux/migrate.h
+++ b/include/linux/migrate.h
@@ -144,16 +144,14 @@ const struct movable_operations *page_movable_ops(struct page *page)
 #ifdef CONFIG_NUMA_BALANCING
 int migrate_misplaced_folio_prepare(struct folio *folio,
 		struct vm_area_struct *vma, int node);
-int migrate_misplaced_folio(struct folio *folio, struct vm_area_struct *vma,
-			   int node);
+int migrate_misplaced_folio(struct folio *folio, int node);
 #else
 static inline int migrate_misplaced_folio_prepare(struct folio *folio,
 		struct vm_area_struct *vma, int node)
 {
 	return -EAGAIN; /* can't migrate now */
 }
-static inline int migrate_misplaced_folio(struct folio *folio,
-					 struct vm_area_struct *vma, int node)
+static inline int migrate_misplaced_folio(struct folio *folio, int node)
 {
 	return -EAGAIN; /* can't migrate now */
 }
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index ee335d96fc39..ab46ef718b44 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -2002,7 +2002,7 @@ vm_fault_t do_huge_pmd_numa_page(struct vm_fault *vmf)
 	spin_unlock(vmf->ptl);
 	writable = false;
 
-	if (!migrate_misplaced_folio(folio, vma, target_nid)) {
+	if (!migrate_misplaced_folio(folio, target_nid)) {
 		flags |= TNF_MIGRATED;
 		nid = target_nid;
 		task_numa_fault(last_cpupid, nid, HPAGE_PMD_NR, flags);
diff --git a/mm/memory.c b/mm/memory.c
index 75c2dfd04f72..12bb79d4df72 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -5625,7 +5625,7 @@ static vm_fault_t do_numa_page(struct vm_fault *vmf)
 	ignore_writable = true;
 
 	/* Migrate to the requested node */
-	if (!migrate_misplaced_folio(folio, vma, target_nid)) {
+	if (!migrate_misplaced_folio(folio, target_nid)) {
 		nid = target_nid;
 		flags |= TNF_MIGRATED;
 		task_numa_fault(last_cpupid, nid, nr_pages, flags);
diff --git a/mm/migrate.c b/mm/migrate.c
index 2ce6b4b814df..411b378dd39f 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -2683,8 +2683,7 @@ int migrate_misplaced_folio_prepare(struct folio *folio,
  * elevated reference count on the folio. This function will un-isolate the
  * folio, dereferencing the folio before returning.
  */
-int migrate_misplaced_folio(struct folio *folio, struct vm_area_struct *vma,
-			    int node)
+int migrate_misplaced_folio(struct folio *folio, int node)
 {
 	pg_data_t *pgdat = NODE_DATA(node);
 	int nr_remaining;
-- 
2.37.2



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

* Re: [PATCH] Removed unused argument vma from migrate_misplaced_folio
  2024-11-25  7:57 [PATCH] Removed unused argument vma from migrate_misplaced_folio Donet Tom
@ 2024-11-26 13:58 ` Baolin Wang
  2024-11-26 15:20   ` Donet Tom
  2024-11-26 14:38 ` Zi Yan
  1 sibling, 1 reply; 4+ messages in thread
From: Baolin Wang @ 2024-11-26 13:58 UTC (permalink / raw)
  To: Donet Tom, Andrew Morton, linux-mm, linux-kernel, David Hildenbrand
  Cc: Ritesh Harjani, Zi Yan



On 2024/11/25 15:57, Donet Tom wrote:
> Commit ee86814b0562 ("mm/migrate: move NUMA hinting fault folio
> isolation + checks under PTL") removed the code that had used
> the vma argument in migrate_misplaced_folio.
> 
> Since the vma argument was no longer used in migrate_misplaced_folio,
> this patch removed it.
> 
> Signed-off-by: Donet Tom <donettom@linux.ibm.com>

Better to add 'mm:' prefix for the subject line to identify the 
subsytem, otherwise look good to me.

Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>


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

* Re: [PATCH] Removed unused argument vma from migrate_misplaced_folio
  2024-11-25  7:57 [PATCH] Removed unused argument vma from migrate_misplaced_folio Donet Tom
  2024-11-26 13:58 ` Baolin Wang
@ 2024-11-26 14:38 ` Zi Yan
  1 sibling, 0 replies; 4+ messages in thread
From: Zi Yan @ 2024-11-26 14:38 UTC (permalink / raw)
  To: Donet Tom
  Cc: Andrew Morton, linux-mm, linux-kernel, David Hildenbrand,
	Ritesh Harjani, Baolin Wang

On 25 Nov 2024, at 2:57, Donet Tom wrote:

> Commit ee86814b0562 ("mm/migrate: move NUMA hinting fault folio
> isolation + checks under PTL") removed the code that had used
> the vma argument in migrate_misplaced_folio.
>
> Since the vma argument was no longer used in migrate_misplaced_folio,
> this patch removed it.
>
> Signed-off-by: Donet Tom <donettom@linux.ibm.com>
> ---
>  include/linux/migrate.h | 6 ++----
>  mm/huge_memory.c        | 2 +-
>  mm/memory.c             | 2 +-
>  mm/migrate.c            | 3 +--
>  4 files changed, 5 insertions(+), 8 deletions(-)

Like Baolin suggested in another email, "mm/migrate:" prefix should be
used. Otherwise, LGTM. Thanks. Reviewed-by: Zi Yan <ziy@nvidia.com>

--
Best Regards,
Yan, Zi


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

* Re: [PATCH] Removed unused argument vma from migrate_misplaced_folio
  2024-11-26 13:58 ` Baolin Wang
@ 2024-11-26 15:20   ` Donet Tom
  0 siblings, 0 replies; 4+ messages in thread
From: Donet Tom @ 2024-11-26 15:20 UTC (permalink / raw)
  To: Baolin Wang, Andrew Morton, linux-mm, linux-kernel, David Hildenbrand
  Cc: Ritesh Harjani, Zi Yan


On 11/26/24 19:28, Baolin Wang wrote:
>
>
> On 2024/11/25 15:57, Donet Tom wrote:
>> Commit ee86814b0562 ("mm/migrate: move NUMA hinting fault folio
>> isolation + checks under PTL") removed the code that had used
>> the vma argument in migrate_misplaced_folio.
>>
>> Since the vma argument was no longer used in migrate_misplaced_folio,
>> this patch removed it.
>>
>> Signed-off-by: Donet Tom <donettom@linux.ibm.com>
>
> Better to add 'mm:' prefix for the subject line to identify the 
> subsytem, otherwise look good to me.

Thank you. I will send a V2 with the prefix.

>
> Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
>


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

end of thread, other threads:[~2024-12-05 15:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-25  7:57 [PATCH] Removed unused argument vma from migrate_misplaced_folio Donet Tom
2024-11-26 13:58 ` Baolin Wang
2024-11-26 15:20   ` Donet Tom
2024-11-26 14:38 ` Zi Yan

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