From: Michal Hocko <mhocko-AlSwsSmVLrQ@public.gmane.org>
To: Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
Cc: Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
Vladimir Davydov
<vdavydov-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>,
linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org,
cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [patch] mm: memcontrol: fold move_anon() and move_file()
Date: Wed, 14 Jan 2015 16:42:10 +0100 [thread overview]
Message-ID: <20150114154210.GG4706@dhcp22.suse.cz> (raw)
In-Reply-To: <1421175592-14179-1-git-send-email-hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
On Tue 13-01-15 13:59:52, Johannes Weiner wrote:
> Turn the move type enum into flags and give the flags field a shorter
> name. Once that is done, move_anon() and move_file() are simple
> enough to just fold them into the callsites.
>
> Signed-off-by: Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
Acked-by: Michal Hocko <mhocko-AlSwsSmVLrQ@public.gmane.org>
one nit below
> ---
> mm/memcontrol.c | 49 ++++++++++++++++++-------------------------------
> 1 file changed, 18 insertions(+), 31 deletions(-)
>
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 5a5769e8b12c..692e96407627 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -360,21 +360,18 @@ static bool memcg_kmem_is_active(struct mem_cgroup *memcg)
>
> /* Stuffs for move charges at task migration. */
> /*
> - * Types of charges to be moved. "move_charge_at_immitgrate" and
> - * "immigrate_flags" are treated as a left-shifted bitmap of these types.
> + * Types of charges to be moved.
> */
> -enum move_type {
> - MOVE_CHARGE_TYPE_ANON, /* private anonymous page and swap of it */
> - MOVE_CHARGE_TYPE_FILE, /* file page(including tmpfs) and swap of it */
> - NR_MOVE_TYPE,
> -};
> +#define MOVE_ANON 0x1U
> +#define MOVE_FILE 0x2U
> +#define MOVE_MASK 0x3U
#define MOVE_MASK (MOVE_ANON | MOVE_FILE)
would be probably better
[...]
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2015-01-14 15:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1421175592-14179-1-git-send-email-hannes@cmpxchg.org>
[not found] ` <1421175592-14179-1-git-send-email-hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
2015-01-14 14:06 ` [patch] mm: memcontrol: fold move_anon() and move_file() Vladimir Davydov
2015-01-14 15:42 ` Michal Hocko [this message]
2015-01-13 18:59 Johannes Weiner
-- strict thread matches above, loose matches on Subject: below --
2015-01-13 18:59 Johannes Weiner
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=20150114154210.GG4706@dhcp22.suse.cz \
--to=mhocko-alswssmvlrq@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \
--cc=vdavydov-bzQdu9zFT3WakBO8gow8eQ@public.gmane.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