From: Michal Hocko <mhocko@kernel.org>
To: Hugh Dickins <hughd@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
David Rientjes <rientjes@google.com>,
Gerald Schaefer <gerald.schaefer@de.ibm.com>,
linux-mm@kvack.org
Subject: Re: [PATCH] mm: add cond_resched() in gather_pte_stats()
Date: Wed, 7 Dec 2016 13:31:32 +0100 [thread overview]
Message-ID: <20161207123132.GA31912@dhcp22.suse.cz> (raw)
In-Reply-To: <alpine.LSU.2.11.1612052157400.13021@eggly.anvils>
On Mon 05-12-16 22:00:22, Hugh Dickins wrote:
> 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.
The patch seems correct, I am just wondering whether pushing the
cond_resched into the pte walk code (walk_pmd_range) would be more
appropriate.
> Signed-off-by: Hugh Dickins <hughd@google.com>
Anyway
Acked-by: Michal Hocko <mhocko@suse.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>
--
Michal Hocko
SUSE Labs
--
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>
prev parent reply other threads:[~2016-12-07 12:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-06 6:00 Hugh Dickins
2016-12-07 12:31 ` Michal Hocko [this message]
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=20161207123132.GA31912@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=gerald.schaefer@de.ibm.com \
--cc=hughd@google.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