From: Hugh Dickins <hughd@google.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: David Rientjes <rientjes@google.com>,
Gerald Schaefer <gerald.schaefer@de.ibm.com>,
linux-mm@kvack.org
Subject: [PATCH] mm: add cond_resched() in gather_pte_stats()
Date: Mon, 5 Dec 2016 22:00:22 -0800 (PST) [thread overview]
Message-ID: <alpine.LSU.2.11.1612052157400.13021@eggly.anvils> (raw)
The other pagetable walks in task_mmu.c have a cond_resched() after
walking their ptes: add a cond_resched() in gather_pte_stats() too,
for reading /proc/<id>/numa_maps. Only pagemap_pmd_range() has a
cond_resched() in its (unusually expensive) pmd_trans_huge case:
more should probably be added, but leave them unchanged for now.
Signed-off-by: Hugh Dickins <hughd@google.com>
---
fs/proc/task_mmu.c | 1 +
1 file changed, 1 insertion(+)
--- 4.9-rc8/fs/proc/task_mmu.c 2016-10-23 17:33:00.156860538 -0700
+++ linux/fs/proc/task_mmu.c 2016-12-05 20:27:04.084531599 -0800
@@ -1588,6 +1588,7 @@ static int gather_pte_stats(pmd_t *pmd,
} while (pte++, addr += PAGE_SIZE, addr != end);
pte_unmap_unlock(orig_pte, ptl);
+ cond_resched();
return 0;
}
#ifdef CONFIG_HUGETLB_PAGE
--
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>
next reply other threads:[~2016-12-06 6:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-06 6:00 Hugh Dickins [this message]
2016-12-07 12:31 ` Michal Hocko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LSU.2.11.1612052157400.13021@eggly.anvils \
--to=hughd@google.com \
--cc=akpm@linux-foundation.org \
--cc=gerald.schaefer@de.ibm.com \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox