From: Michal Hocko <mhocko@suse.cz>
To: Wanpeng Li <liwp.linux@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Balbir Singh <bsingharora@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Eric Dumazet <eric.dumazet@gmail.com>,
Mike Frysinger <vapier@gentoo.org>, Arun Sharma <asharma@fb.com>,
linux-kernel@vger.kernel.org, cgroups@vger.kernel.org
Subject: Re: [PATCH v3 1/4] memcg: cleanup useless LRU_ALL_EVICTABLE
Date: Mon, 25 Jun 2012 11:33:28 +0200 [thread overview]
Message-ID: <20120625093328.GD19805@tiehlicka.suse.cz> (raw)
In-Reply-To: <1340613812-9458-1-git-send-email-liwp.linux@gmail.com>
Marking this patch as memcg is quite misleading. mm is more suitable.
On Mon 25-06-12 16:43:32, Wanpeng Li wrote:
> From: Wanpeng Li <liwp@linux.vnet.ibm.com>
>
> Since LRU_ALL_EVICTABLE is useless, just remove it.
It's really strange but I do not see any usage of this except for it's
introduction. So agreed to remove it.
> Add LRU_ALL_UNEVICTABLE to mask unevictable pages.
Does it really make sense to introduce just for two uses in a single
function?
>
> Signed-off-by: Wanpeng Li <liwp.linux@gmail.com>
> ---
> include/linux/mmzone.h | 2 +-
> mm/memcontrol.c | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
> index 68c569f..5873620 100644
> --- a/include/linux/mmzone.h
> +++ b/include/linux/mmzone.h
> @@ -209,7 +209,7 @@ struct lruvec {
> /* Mask used at gathering information at once (see memcontrol.c) */
> #define LRU_ALL_FILE (BIT(LRU_INACTIVE_FILE) | BIT(LRU_ACTIVE_FILE))
> #define LRU_ALL_ANON (BIT(LRU_INACTIVE_ANON) | BIT(LRU_ACTIVE_ANON))
> -#define LRU_ALL_EVICTABLE (LRU_ALL_FILE | LRU_ALL_ANON)
> +#define LRU_ALL_UNEVICTABLE (BIT(LRU_UNEVICTABLE))
> #define LRU_ALL ((1 << NR_LRU_LISTS) - 1)
>
> /* Isolate clean file */
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 724bd02..ccda728 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -4033,11 +4033,11 @@ static int mem_control_numa_stat_show(struct cgroup *cont, struct cftype *cft,
> }
> seq_putc(m, '\n');
>
> - unevictable_nr = mem_cgroup_nr_lru_pages(memcg, BIT(LRU_UNEVICTABLE));
> + unevictable_nr = mem_cgroup_nr_lru_pages(memcg, LRU_ALL_UNEVICTABLE);
> seq_printf(m, "unevictable=%lu", unevictable_nr);
> for_each_node_state(nid, N_HIGH_MEMORY) {
> node_nr = mem_cgroup_node_nr_lru_pages(memcg, nid,
> - BIT(LRU_UNEVICTABLE));
> + LRU_ALL_UNEVICTABLE);
> seq_printf(m, " N%d=%lu", nid, node_nr);
> }
> seq_putc(m, '\n');
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe cgroups" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9
Czech Republic
next prev parent reply other threads:[~2012-06-25 9:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-25 8:43 [PATCH v3 1/4] memcg: cleanup useless LRU_ALL_EVICTABLE Wanpeng Li
2012-06-25 9:33 ` Michal Hocko [this message]
2012-06-25 9:59 ` Kamezawa Hiroyuki
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=20120625093328.GD19805@tiehlicka.suse.cz \
--to=mhocko@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=asharma@fb.com \
--cc=bsingharora@gmail.com \
--cc=cgroups@vger.kernel.org \
--cc=eric.dumazet@gmail.com \
--cc=hannes@cmpxchg.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liwp.linux@gmail.com \
--cc=vapier@gentoo.org \
/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