From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com [209.85.220.42]) by kanga.kvack.org (Postfix) with ESMTP id 3F5C06B006E for ; Tue, 21 Oct 2014 21:52:28 -0400 (EDT) Received: by mail-pa0-f42.google.com with SMTP id bj1so2625653pad.15 for ; Tue, 21 Oct 2014 18:52:27 -0700 (PDT) Received: from fgwmail6.fujitsu.co.jp (fgwmail6.fujitsu.co.jp. [192.51.44.36]) by mx.google.com with ESMTPS id eu16si12969973pad.19.2014.10.21.18.52.26 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 21 Oct 2014 18:52:27 -0700 (PDT) Received: from kw-mxauth.gw.nic.fujitsu.com (unknown [10.0.237.134]) by fgwmail6.fujitsu.co.jp (Postfix) with ESMTP id 21ED03EE0C1 for ; Wed, 22 Oct 2014 10:52:26 +0900 (JST) Received: from s2.gw.fujitsu.co.jp (s2.gw.fujitsu.co.jp [10.0.50.92]) by kw-mxauth.gw.nic.fujitsu.com (Postfix) with ESMTP id 2F736AC04B3 for ; Wed, 22 Oct 2014 10:52:25 +0900 (JST) Received: from g01jpfmpwyt03.exch.g01.fujitsu.local (g01jpfmpwyt03.exch.g01.fujitsu.local [10.128.193.57]) by s2.gw.fujitsu.co.jp (Postfix) with ESMTP id CB3DC1DB803F for ; Wed, 22 Oct 2014 10:52:24 +0900 (JST) Message-ID: <54470DC5.4050709@jp.fujitsu.com> Date: Wed, 22 Oct 2014 10:52:05 +0900 From: Kamezawa Hiroyuki MIME-Version: 1.0 Subject: Re: [patch 3/4] mm: memcontrol: remove unnecessary PCG_MEM memory charge flag References: <1413818532-11042-1-git-send-email-hannes@cmpxchg.org> <1413818532-11042-4-git-send-email-hannes@cmpxchg.org> In-Reply-To: <1413818532-11042-4-git-send-email-hannes@cmpxchg.org> Content-Type: text/plain; charset="ISO-2022-JP" Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Johannes Weiner , Andrew Morton Cc: Hugh Dickins , Michal Hocko , Vladimir Davydov , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org (2014/10/21 0:22), 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 Acked-by: KAMEZAWA Hiroyuki > --- > 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); > > -- 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: email@kvack.org