All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm: migration: pair unlock_page and lock_page when migrating huge pages
@ 2011-11-25 12:20 ` Hillf Danton
  0 siblings, 0 replies; 4+ messages in thread
From: Hillf Danton @ 2011-11-25 12:20 UTC (permalink / raw)
  To: Naoya Horiguchi; +Cc: Andrea Arcangeli, Andrew Morton, LKML, linux-mm

Skip unlocking page if fail to lock, then lock and unlock are paired.

Signed-off-by: Hillf Danton <dhillf@gmail.com>
---

--- a/mm/migrate.c	Fri Nov 25 20:11:14 2011
+++ b/mm/migrate.c	Fri Nov 25 20:21:26 2011
@@ -869,9 +869,9 @@ static int unmap_and_move_huge_page(new_

 	if (anon_vma)
 		put_anon_vma(anon_vma);
-out:
 	unlock_page(hpage);

+out:
 	if (rc != -EAGAIN) {
 		list_del(&hpage->lru);
 		put_page(hpage);

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* [PATCH] mm: migration: pair unlock_page and lock_page when migrating huge pages
@ 2011-11-25 12:20 ` Hillf Danton
  0 siblings, 0 replies; 4+ messages in thread
From: Hillf Danton @ 2011-11-25 12:20 UTC (permalink / raw)
  To: Naoya Horiguchi; +Cc: Andrea Arcangeli, Andrew Morton, LKML, linux-mm

Skip unlocking page if fail to lock, then lock and unlock are paired.

Signed-off-by: Hillf Danton <dhillf@gmail.com>
---

--- a/mm/migrate.c	Fri Nov 25 20:11:14 2011
+++ b/mm/migrate.c	Fri Nov 25 20:21:26 2011
@@ -869,9 +869,9 @@ static int unmap_and_move_huge_page(new_

 	if (anon_vma)
 		put_anon_vma(anon_vma);
-out:
 	unlock_page(hpage);

+out:
 	if (rc != -EAGAIN) {
 		list_del(&hpage->lru);
 		put_page(hpage);

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

* Re: [PATCH] mm: migration: pair unlock_page and lock_page when migrating huge pages
  2011-11-25 12:20 ` Hillf Danton
@ 2011-11-26 17:33   ` Andrea Arcangeli
  -1 siblings, 0 replies; 4+ messages in thread
From: Andrea Arcangeli @ 2011-11-26 17:33 UTC (permalink / raw)
  To: Hillf Danton; +Cc: Naoya Horiguchi, Andrew Morton, LKML, linux-mm

Hi Hillf,

On Fri, Nov 25, 2011 at 08:20:31PM +0800, Hillf Danton wrote:
> Skip unlocking page if fail to lock, then lock and unlock are paired.
> 
> Signed-off-by: Hillf Danton <dhillf@gmail.com>
> ---
> 
> --- a/mm/migrate.c	Fri Nov 25 20:11:14 2011
> +++ b/mm/migrate.c	Fri Nov 25 20:21:26 2011
> @@ -869,9 +869,9 @@ static int unmap_and_move_huge_page(new_
> 
>  	if (anon_vma)
>  		put_anon_vma(anon_vma);
> -out:
>  	unlock_page(hpage);
> 
> +out:
>  	if (rc != -EAGAIN) {
>  		list_del(&hpage->lru);
>  		put_page(hpage);

Looks good, I guess that path wasn't exercised frequently because
there's no blocking I/O involvement with hugetlbfs.

Thanks,
Andrea

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] mm: migration: pair unlock_page and lock_page when migrating huge pages
@ 2011-11-26 17:33   ` Andrea Arcangeli
  0 siblings, 0 replies; 4+ messages in thread
From: Andrea Arcangeli @ 2011-11-26 17:33 UTC (permalink / raw)
  To: Hillf Danton; +Cc: Naoya Horiguchi, Andrew Morton, LKML, linux-mm

Hi Hillf,

On Fri, Nov 25, 2011 at 08:20:31PM +0800, Hillf Danton wrote:
> Skip unlocking page if fail to lock, then lock and unlock are paired.
> 
> Signed-off-by: Hillf Danton <dhillf@gmail.com>
> ---
> 
> --- a/mm/migrate.c	Fri Nov 25 20:11:14 2011
> +++ b/mm/migrate.c	Fri Nov 25 20:21:26 2011
> @@ -869,9 +869,9 @@ static int unmap_and_move_huge_page(new_
> 
>  	if (anon_vma)
>  		put_anon_vma(anon_vma);
> -out:
>  	unlock_page(hpage);
> 
> +out:
>  	if (rc != -EAGAIN) {
>  		list_del(&hpage->lru);
>  		put_page(hpage);

Looks good, I guess that path wasn't exercised frequently because
there's no blocking I/O involvement with hugetlbfs.

Thanks,
Andrea

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

end of thread, other threads:[~2011-11-26 18:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-25 12:20 [PATCH] mm: migration: pair unlock_page and lock_page when migrating huge pages Hillf Danton
2011-11-25 12:20 ` Hillf Danton
2011-11-26 17:33 ` Andrea Arcangeli
2011-11-26 17:33   ` Andrea Arcangeli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.