Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1403981
| From | David Rientjes <rientjes@google.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [patch] mm, migrate: increment fail count on ENOMEM |
| Date | 2016-05-20 00:20 +0200 |
| Message-ID | <rAEsp-5GL-5@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
If page migration fails due to -ENOMEM, nr_failed should still be
incremented for proper statistics.
This was encountered recently when all page migration vmstats showed 0,
and inferred that migrate_pages() was never called, although in reality
the first page migration failed because compaction_alloc() failed to find
a migration target.
This patch increments nr_failed so the vmstat is properly accounted on
ENOMEM.
Signed-off-by: David Rientjes <rientjes@google.com>
---
mm/migrate.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/migrate.c b/mm/migrate.c
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1171,6 +1171,7 @@ int migrate_pages(struct list_head *from, new_page_t get_new_page,
switch(rc) {
case -ENOMEM:
+ nr_failed++;
goto out;
case -EAGAIN:
retry++;
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[patch] mm, migrate: increment fail count on ENOMEM David Rientjes <rientjes@google.com> - 2016-05-20 00:20 +0200
Re: [patch] mm, migrate: increment fail count on ENOMEM Michal Hocko <mhocko@kernel.org> - 2016-05-20 15:10 +0200
Re: [patch] mm, migrate: increment fail count on ENOMEM Vlastimil Babka <vbabka@suse.cz> - 2016-05-20 15:20 +0200
Re: [patch] mm, migrate: increment fail count on ENOMEM Michal Hocko <mhocko@kernel.org> - 2016-05-20 15:40 +0200
Re: [patch] mm, migrate: increment fail count on ENOMEM Andrew Morton <akpm@linux-foundation.org> - 2016-05-24 00:10 +0200
Re: [patch] mm, migrate: increment fail count on ENOMEM Hugh Dickins <hughd@google.com> - 2016-05-24 01:50 +0200
Re: [patch] mm, migrate: increment fail count on ENOMEM Michal Hocko <mhocko@kernel.org> - 2016-05-24 08:20 +0200
csiph-web