From: Michal Hocko <mhocko@suse.cz>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Hugh Dickins <hughd@google.com>,
Vladimir Davydov <vdavydov@parallels.com>,
linux-mm@kvack.org, cgroups@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [patch 3/4] mm: memcontrol: remove unnecessary PCG_MEM memory charge flag
Date: Wed, 22 Oct 2014 17:49:18 +0200 [thread overview]
Message-ID: <20141022154918.GF30802@dhcp22.suse.cz> (raw)
In-Reply-To: <1413818532-11042-4-git-send-email-hannes@cmpxchg.org>
On Mon 20-10-14 11:22:11, Johannes Weiner wrote:
> PCG_MEM is a remnant from an earlier version of 0a31bc97c80c ("mm:
> memcontrol: rewrite uncharge API"), used to tell whether migration
> cleared a charge while leaving pc->mem_cgroup valid and PCG_USED set.
> But in the final version, mem_cgroup_migrate() directly uncharges the
> source page, rendering this distinction unnecessary. Remove it.
>
> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.cz>
> ---
> include/linux/page_cgroup.h | 1 -
> mm/memcontrol.c | 4 +---
> 2 files changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h
> index da62ee2be28b..97536e685843 100644
> --- a/include/linux/page_cgroup.h
> +++ b/include/linux/page_cgroup.h
> @@ -4,7 +4,6 @@
> enum {
> /* flags for mem_cgroup */
> PCG_USED = 0x01, /* This page is charged to a memcg */
> - PCG_MEM = 0x02, /* This page holds a memory charge */
> };
>
> struct pglist_data;
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 9bab35fc3e9e..1d66ac49e702 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -2606,7 +2606,7 @@ static void commit_charge(struct page *page, struct mem_cgroup *memcg,
> * have the page locked
> */
> pc->mem_cgroup = memcg;
> - pc->flags = PCG_USED | PCG_MEM;
> + pc->flags = PCG_USED;
>
> if (lrucare)
> unlock_page_lru(page, isolated);
> @@ -6177,8 +6177,6 @@ void mem_cgroup_migrate(struct page *oldpage, struct page *newpage,
> if (!PageCgroupUsed(pc))
> return;
>
> - VM_BUG_ON_PAGE(!(pc->flags & PCG_MEM), oldpage);
> -
> if (lrucare)
> lock_page_lru(oldpage, &isolated);
>
> --
> 2.1.2
>
--
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>
next prev parent reply other threads:[~2014-10-22 15:49 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-20 15:22 [patch 0/4] mm: memcontrol: remove the page_cgroup->flags field Johannes Weiner
2014-10-20 15:22 ` [patch 1/4] mm: memcontrol: uncharge pages on swapout Johannes Weiner
2014-10-21 1:07 ` Kamezawa Hiroyuki
2014-10-21 20:39 ` Johannes Weiner
2014-10-21 12:52 ` Vladimir Davydov
2014-10-21 21:03 ` Johannes Weiner
2014-10-22 8:33 ` Vladimir Davydov
2014-10-22 13:20 ` Johannes Weiner
2014-10-22 15:37 ` Vladimir Davydov
2014-10-22 15:34 ` Michal Hocko
2014-10-20 15:22 ` [patch 2/4] mm: memcontrol: remove unnecessary PCG_MEMSW memory+swap charge flag Johannes Weiner
2014-10-22 1:50 ` Kamezawa Hiroyuki
2014-10-22 15:43 ` Vladimir Davydov
2014-10-22 15:46 ` Michal Hocko
2014-10-20 15:22 ` [patch 3/4] mm: memcontrol: remove unnecessary PCG_MEM memory " Johannes Weiner
2014-10-22 1:52 ` Kamezawa Hiroyuki
2014-10-22 15:44 ` Vladimir Davydov
2014-10-22 15:49 ` Michal Hocko [this message]
2014-10-20 15:22 ` [patch 4/4] mm: memcontrol: remove unnecessary PCG_USED pc->mem_cgroup valid flag Johannes Weiner
2014-10-22 1:54 ` Kamezawa Hiroyuki
2014-10-22 16:05 ` Vladimir Davydov
2014-10-22 16:11 ` 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=20141022154918.GF30802@dhcp22.suse.cz \
--to=mhocko@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=vdavydov@parallels.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;
as well as URLs for NNTP newsgroup(s).