linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] mm: memcontrol: clarify migration where old page is uncharged
@ 2014-10-19 15:30 Johannes Weiner
  2014-10-20 19:45 ` Michal Hocko
  0 siblings, 1 reply; 2+ messages in thread
From: Johannes Weiner @ 2014-10-19 15:30 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Hugh Dickins, Michal Hocko, linux-mm, cgroups, linux-kernel

Better explain re-entrant migration when compaction races with
reclaim, and also mention swapcache readahead pages as possible
uncharged migration sources.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
---
 mm/memcontrol.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index fc1d7ca96b9d..76892eb89d26 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -6166,7 +6166,12 @@ void mem_cgroup_migrate(struct page *oldpage, struct page *newpage,
 	if (PageCgroupUsed(pc))
 		return;
 
-	/* Re-entrant migration: old page already uncharged? */
+	/*
+	 * Swapcache readahead pages can get migrated before being
+	 * charged, and migration from compaction can happen to an
+	 * uncharged page when the PFN walker finds a page that
+	 * reclaim just put back on the LRU but has not released yet.
+	 */
 	pc = lookup_page_cgroup(oldpage);
 	if (!PageCgroupUsed(pc))
 		return;
-- 
2.1.2


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

* Re: [patch] mm: memcontrol: clarify migration where old page is uncharged
  2014-10-19 15:30 [patch] mm: memcontrol: clarify migration where old page is uncharged Johannes Weiner
@ 2014-10-20 19:45 ` Michal Hocko
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Hocko @ 2014-10-20 19:45 UTC (permalink / raw)
  To: Johannes Weiner
  Cc: Andrew Morton, Hugh Dickins, linux-mm, cgroups, linux-kernel

On Sun 19-10-14 11:30:47, Johannes Weiner wrote:
> Better explain re-entrant migration when compaction races with
> reclaim, and also mention swapcache readahead pages as possible
> uncharged migration sources.
> 
> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>

Acked-by: Michal Hocko <mhocko@suse.cz>

> ---
>  mm/memcontrol.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index fc1d7ca96b9d..76892eb89d26 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -6166,7 +6166,12 @@ void mem_cgroup_migrate(struct page *oldpage, struct page *newpage,
>  	if (PageCgroupUsed(pc))
>  		return;
>  
> -	/* Re-entrant migration: old page already uncharged? */
> +	/*
> +	 * Swapcache readahead pages can get migrated before being
> +	 * charged, and migration from compaction can happen to an
> +	 * uncharged page when the PFN walker finds a page that
> +	 * reclaim just put back on the LRU but has not released yet.
> +	 */
>  	pc = lookup_page_cgroup(oldpage);
>  	if (!PageCgroupUsed(pc))
>  		return;
> -- 
> 2.1.2
> 

-- 
Michal Hocko
SUSE Labs

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

end of thread, other threads:[~2014-10-20 19:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-19 15:30 [patch] mm: memcontrol: clarify migration where old page is uncharged Johannes Weiner
2014-10-20 19:45 ` Michal Hocko

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).