Skip to contentSkip to conversation

Fixes: Commit 3c226c637b69 ("mm: numa: avoid waiting on freed migrated pages")

PATCH In review Chas Williams 3 participants 12 messages Sep 5, 2018 – Sep 6, 2018 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fixes: Commit 3c226c637b69 ("mm: numa: avoid waiting on freed migrated pages")

From: Chas Williams <[email protected]>

Commit 3c226c637b69 ("mm: numa: avoid waiting on freed migrated pages") was an incomplete backport of the upstream commit. It is necessary to always reset page_nid before attempting any early exit.

---
 mm/huge_memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/huge_memory.c +1 -1
index 9efe88ef9702..e4c6c3edaf6a 100644
@@ -1259,12 +1259,12 @@ int do_huge_pmd_numa_page(struct fault_env *fe, pmd_t pmd)
 
 	/* Migration could have started since the pmd_trans_migrating check */
 	if (!page_locked) {
+		page_nid = -1;
 		if (!get_page_unless_zero(page))
 			goto out_unlock;
 		spin_unlock(fe->ptl);
 		wait_on_page_locked(page);
 		put_page(page);
-		page_nid = -1;
 		goto out;
 	}
 
Signature · 1 line
2.14.4
maintainer
#1 lore raw
Quoted 9 lines · Chas Williams

From: Chas Williams <[email protected]>

Commit 3c226c637b69 ("mm: numa: avoid waiting on freed migrated pages") was an incomplete backport of the upstream commit. It is necessary to always reset page_nid before attempting any early exit.

---
 mm/huge_memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

<formletter>

This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

#2 lore raw
Quoted 11 lines · Greg KH
Quoted 9 lines · Chas Williams

From: Chas Williams <[email protected]>

Commit 3c226c637b69 ("mm: numa: avoid waiting on freed migrated pages") was an incomplete backport of the upstream commit. It is necessary to always reset page_nid before attempting any early exit.

---
 mm/huge_memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 8 lines

<formletter>

This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

This is an issue with the 4.9 tree, not mainline. The hash is incorrect but the problem appears valid.

Compare:

2aa6d036b716 ("mm: numa: avoid waiting on freed migrated pages")

from v4.9.36 with the upstream commit from 4.12:

3c226c637b69 ("mm: numa: avoid waiting on freed migrated pages")

It is missing this diff.

The original commit conflicted due to lack of commit 82b0f8c39a38 ("mm:
join struct fault_env and vm_fault") in 4.9 so it wasn't a clean application, must have just gotten lost in the noise.

Cheers,
Nathan

#4 lore raw
In reply to a message not in the archive
Quoted 23 lines · Chas Williams
Quoted 20 lines · Nathan Chancellor
Quoted 11 lines · Greg KH
Quoted 9 lines · Chas Williams

From: Chas Williams <[email protected]>

Commit 3c226c637b69 ("mm: numa: avoid waiting on freed migrated pages") was an incomplete backport of the upstream commit. It is necessary to always reset page_nid before attempting any early exit.

---
 mm/huge_memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 5 lines

<formletter>

This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read:

https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html

Quoted 2 lines

for how to do this properly.

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

</formletter>

This is an issue with the 4.9 tree, not mainline. The hash is incorrect but the problem appears valid.

Unfortunately, this issue doesn't fit into option 1, 2 or 3. I could only do option 4.

Ok, but if so, you need to at least sign-off on your patch, right? :)

Also, call it out explicitly what you are trying to do here, and why the patch is not upstream, so I know what is going on.

thanks,

greg k-h

#5 lore raw
Quoted 27 lines · Greg Kroah-Hartman
Quoted 25 lines · Chas Williams
Quoted 22 lines · Nathan Chancellor
Quoted 11 lines · Greg KH
Quoted 9 lines · Chas Williams

From: Chas Williams <[email protected]>

Commit 3c226c637b69 ("mm: numa: avoid waiting on freed migrated pages") was an incomplete backport of the upstream commit. It is necessary to always reset page_nid before attempting any early exit.

---
 mm/huge_memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 5 lines

<formletter>

This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read:

https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html

Quoted 3 lines

for how to do this properly.

</formletter>

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

This is an issue with the 4.9 tree, not mainline. The hash is incorrect but the problem appears valid.

Unfortunately, this issue doesn't fit into option 1, 2 or 3. I could only do option 4.

Ok, but if so, you need to at least sign-off on your patch, right? :)

I can. I wasn't clear to me since I am just fixing what the original author wrote.

Quoted 4 lines

Also, call it out explicitly what you are trying to do here, and why the patch is not upstream, so I know what is going on.

How would you like this done? I thought the body of the commit message was fairly clear (with the exception of the hash).

Quoted 5 lines

thanks,

greg k-h

#6 lore raw
Quoted 33 lines · Chas Williams
Quoted 31 lines · Greg Kroah-Hartman
Quoted 29 lines · Chas Williams
Quoted 25 lines · Nathan Chancellor
Quoted 11 lines · Greg KH
Quoted 9 lines · Chas Williams

From: Chas Williams <[email protected]>

Commit 3c226c637b69 ("mm: numa: avoid waiting on freed migrated pages") was an incomplete backport of the upstream commit. It is necessary to always reset page_nid before attempting any early exit.

---
 mm/huge_memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 5 lines

<formletter>

This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read:

https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html

Quoted 3 lines

for how to do this properly.

</formletter>

This is an issue with the 4.9 tree, not mainline. The hash is incorrect but the problem appears valid.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Unfortunately, this issue doesn't fit into option 1, 2 or 3. I could only do option 4.

Ok, but if so, you need to at least sign-off on your patch, right? :)

I can. I wasn't clear to me since I am just fixing what the original author wrote.

We can not take a patch without a signed-off-by, that's for any kernel patch, nothing special about stable trees here.

Quoted 6 lines
Quoted 2 lines

Also, call it out explicitly what you are trying to do here, and why the patch is not upstream, so I know what is going on.

How would you like this done? I thought the body of the commit message was fairly clear (with the exception of the hash).

Summarize the other info in this thread there as well.

thanks,

greg k-h

#7 lore raw

PATCH 1/1 Fixes: Commit 2aa6d036b716 ("mm: numa: avoid waiting on freed migrated pages")

In reply to Chas Williams

From: Chas Williams <[email protected]>

Commit 2aa6d036b716 ("mm: numa: avoid waiting on freed migrated pages") was an incomplete backport of the upstream commit. It is necessary to always reset page_nid before attempting any early exit.

The original commit conflicted due to lack of commit 82b0f8c39a38 ("mm: join struct fault_env and vm_fault") in 4.9 so it wasn't a clean application, and the change must have just gotten lost in the noise.

---
 mm/huge_memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/huge_memory.c +1 -1
index 9efe88ef9702..e4c6c3edaf6a 100644
@@ -1259,12 +1259,12 @@ int do_huge_pmd_numa_page(struct fault_env *fe, pmd_t pmd)
 
 	/* Migration could have started since the pmd_trans_migrating check */
 	if (!page_locked) {
+		page_nid = -1;
 		if (!get_page_unless_zero(page))
 			goto out_unlock;
 		spin_unlock(fe->ptl);
 		wait_on_page_locked(page);
 		put_page(page);
-		page_nid = -1;
 		goto out;
 	}
 
Signature · 1 line
2.14.4
maintainer
#8 lore raw

Re: [PATCH] Fixes: Commit 2aa6d036b716 ("mm: numa: avoid waiting on freed migrated pages")

Quoted 6 lines · Chas Williams

From: Chas Williams <[email protected]>

Commit 2aa6d036b716 ("mm: numa: avoid waiting on freed migrated pages") was an incomplete backport of the upstream commit. It is necessary to always reset page_nid before attempting any early exit.

Quoted 8 lines

The original commit conflicted due to lack of commit 82b0f8c39a38 ("mm: join struct fault_env and vm_fault") in 4.9 so it wasn't a clean application, and the change must have just gotten lost in the noise.

---
 mm/huge_memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Much better, thanks!

But can you cc: the people involved in that first patch to get their ack?

Also, what about 4.4.y and 3.18.y which had the original commit backported as well? Do they also need this fix?

thanks,

greg k-h

#9 lore raw

Re: [PATCH] Fixes: Commit 2aa6d036b716 ("mm: numa: avoid waiting on freed migrated pages")

Quoted 17 lines · Greg KH
Quoted 6 lines · Chas Williams

From: Chas Williams <[email protected]>

Commit 2aa6d036b716 ("mm: numa: avoid waiting on freed migrated pages") was an incomplete backport of the upstream commit. It is necessary to always reset page_nid before attempting any early exit.

Quoted 8 lines

The original commit conflicted due to lack of commit 82b0f8c39a38 ("mm: join struct fault_env and vm_fault") in 4.9 so it wasn't a clean application, and the change must have just gotten lost in the noise.

---
 mm/huge_memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 7 lines

Much better, thanks!

But can you cc: the people involved in that first patch to get their ack?

Also, what about 4.4.y and 3.18.y which had the original commit backported as well? Do they also need this fix?

Yes, both are broken.

Quoted 3 lines

thanks,

greg k-h

#10 lore raw

PATCH 1/1 Fixes: Commit 2aa6d036b716 ("mm: numa: avoid waiting on freed migrated pages")

In reply to Chas Williams

From: Chas Williams <[email protected]>

Commit 2aa6d036b716 ("mm: numa: avoid waiting on freed migrated pages") was an incomplete backport of the upstream commit. It is necessary to always reset page_nid before attempting any early exit.

The original commit conflicted due to lack of commit 82b0f8c39a38 ("mm: join struct fault_env and vm_fault") in 4.9 so it wasn't a clean application, and the change must have just gotten lost in the noise.

---
 mm/huge_memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/huge_memory.c +1 -1
index 9efe88ef9702..e4c6c3edaf6a 100644
@@ -1259,12 +1259,12 @@ int do_huge_pmd_numa_page(struct fault_env *fe, pmd_t pmd)
 
 	/* Migration could have started since the pmd_trans_migrating check */
 	if (!page_locked) {
+		page_nid = -1;
 		if (!get_page_unless_zero(page))
 			goto out_unlock;
 		spin_unlock(fe->ptl);
 		wait_on_page_locked(page);
 		put_page(page);
-		page_nid = -1;
 		goto out;
 	}
 
Signature · 1 line
2.14.4
#11 lore raw

PATCH 1/1 Fixes: Commit 86af955d02bb ("mm: numa: avoid waiting on freed migrated pages")

In reply to Chas Williams

From: Chas Williams <[email protected]>

Commit 86af955d02bb ("mm: numa: avoid waiting on freed migrated pages") was an incomplete backport of the upstream commit. It is necessary to always reset page_nid before attempting any early exit.

The original commit conflicted due to lack of commit 82b0f8c39a38 ("mm: join struct fault_env and vm_fault") in 4.9 so it wasn't a clean application, and the change must have just gotten lost in the noise.

---
 mm/huge_memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/huge_memory.c +1 -1
index 690d172436c4..bc402f39ac48 100644
@@ -1329,12 +1329,12 @@ int do_huge_pmd_numa_page(struct mm_struct *mm, struct vm_area_struct *vma,
 
 	/* Migration could have started since the pmd_trans_migrating check */
 	if (!page_locked) {
+		page_nid = -1;
 		if (!get_page_unless_zero(page))
 			goto out_unlock;
 		spin_unlock(ptl);
 		wait_on_page_locked(page);
 		put_page(page);
-		page_nid = -1;
 		goto out;
 	}
 
Signature · 1 line
2.14.4
#12 lore raw

PATCH 1/1 Fixes: Commit cdbf92675fad ("mm: numa: avoid waiting on freed migrated pages")

In reply to Chas Williams

From: Chas Williams <[email protected]>

Commit cdbf92675fad ("mm: numa: avoid waiting on freed migrated pages") was an incomplete backport of the upstream commit. It is necessary to always reset page_nid before attempting any early exit.

The original commit conflicted due to lack of commit 82b0f8c39a38 ("mm: join struct fault_env and vm_fault") in 4.9 so it wasn't a clean application, and the change must have just gotten lost in the noise.

---
 mm/huge_memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/huge_memory.c +1 -1
index 0127b788272f..c4ea57ee2fd1 100644
@@ -1393,12 +1393,12 @@ int do_huge_pmd_numa_page(struct mm_struct *mm, struct vm_area_struct *vma,
 
 	/* Migration could have started since the pmd_trans_migrating check */
 	if (!page_locked) {
+		page_nid = -1;
 		if (!get_page_unless_zero(page))
 			goto out_unlock;
 		spin_unlock(ptl);
 		wait_on_page_locked(page);
 		put_page(page);
-		page_nid = -1;
 		goto out;
 	}
 
Signature · 1 line
2.14.4