linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm, migrate: count pages failing all retries in vmstat and tracepoint
@ 2015-08-27 14:20 Vlastimil Babka
  2015-08-27 21:02 ` David Rientjes
  0 siblings, 1 reply; 3+ messages in thread
From: Vlastimil Babka @ 2015-08-27 14:20 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-kernel, linux-mm, Naoya Horiguchi, Kirill A. Shutemov,
	Aneesh Kumar K.V, Konstantin Khlebnikov, Vlastimil Babka

Migration tries up to 10 times to migrate pages that return -EAGAIN until it
gives up. If some pages fail all retries, they are counted towards the number
of failed pages that migrate_pages() returns. They should also be counted in
the /proc/vmstat pgmigrate_fail and in the mm_migrate_pages tracepoint.

Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
---
 mm/migrate.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mm/migrate.c b/mm/migrate.c
index eb42671..e705324 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1152,7 +1152,8 @@ int migrate_pages(struct list_head *from, new_page_t get_new_page,
 			}
 		}
 	}
-	rc = nr_failed + retry;
+	nr_failed += retry;
+	rc = nr_failed;
 out:
 	if (nr_succeeded)
 		count_vm_events(PGMIGRATE_SUCCESS, nr_succeeded);
-- 
2.5.0

--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] mm, migrate: count pages failing all retries in vmstat and tracepoint
  2015-08-27 14:20 [PATCH] mm, migrate: count pages failing all retries in vmstat and tracepoint Vlastimil Babka
@ 2015-08-27 21:02 ` David Rientjes
  2015-08-27 21:35   ` Vlastimil Babka
  0 siblings, 1 reply; 3+ messages in thread
From: David Rientjes @ 2015-08-27 21:02 UTC (permalink / raw)
  To: Vlastimil Babka
  Cc: Andrew Morton, linux-kernel, linux-mm, Naoya Horiguchi,
	Kirill A. Shutemov, Aneesh Kumar K.V, Konstantin Khlebnikov

On Thu, 27 Aug 2015, Vlastimil Babka wrote:

> Migration tries up to 10 times to migrate pages that return -EAGAIN until it
> gives up. If some pages fail all retries, they are counted towards the number
> of failed pages that migrate_pages() returns. They should also be counted in
> the /proc/vmstat pgmigrate_fail and in the mm_migrate_pages tracepoint.
> 
> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>

Acked-by: David Rientjes <rientjes@google.com>

I assume nothing else other than stats and tracepoints are affected by 
this and this isn't a critical bugfix :)

--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] mm, migrate: count pages failing all retries in vmstat and tracepoint
  2015-08-27 21:02 ` David Rientjes
@ 2015-08-27 21:35   ` Vlastimil Babka
  0 siblings, 0 replies; 3+ messages in thread
From: Vlastimil Babka @ 2015-08-27 21:35 UTC (permalink / raw)
  To: David Rientjes
  Cc: Andrew Morton, linux-kernel, linux-mm, Naoya Horiguchi,
	Kirill A. Shutemov, Aneesh Kumar K.V, Konstantin Khlebnikov

On 27.8.2015 23:02, David Rientjes wrote:
> On Thu, 27 Aug 2015, Vlastimil Babka wrote:
> 
>> Migration tries up to 10 times to migrate pages that return -EAGAIN until it
>> gives up. If some pages fail all retries, they are counted towards the number
>> of failed pages that migrate_pages() returns. They should also be counted in
>> the /proc/vmstat pgmigrate_fail and in the mm_migrate_pages tracepoint.
>>
>> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
> 
> Acked-by: David Rientjes <rientjes@google.com>

Thanks.

> I assume nothing else other than stats and tracepoints are affected by 
> this and this isn't a critical bugfix :)

Yep, no stable needed :)

--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2015-08-27 21:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-27 14:20 [PATCH] mm, migrate: count pages failing all retries in vmstat and tracepoint Vlastimil Babka
2015-08-27 21:02 ` David Rientjes
2015-08-27 21:35   ` Vlastimil Babka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).