From: "Huang\, Ying" <ying.huang@intel.com>
To: Shakeel Butt <shakeelb@google.com>
Cc: Huang Ying <ying.huang@intel.com>,
Vladimir Davydov <vdavydov.dev@gmail.com>,
Michal Hocko <mhocko@kernel.org>,
Greg Thelen <gthelen@google.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Andrew Morton <akpm@linux-foundation.org>, <linux-mm@kvack.org>,
<linux-kernel@vger.kernel.org>, <cgroups@vger.kernel.org>,
<stable@vger.kernel.org>
Subject: Re: [PATCH] mm, memcg: fix mem_cgroup_swapout() for THPs
Date: Wed, 29 Nov 2017 08:38:08 +0800 [thread overview]
Message-ID: <87o9nlc427.fsf@yhuang-dev.intel.com> (raw)
In-Reply-To: <20171128161941.20931-1-shakeelb@google.com> (Shakeel Butt's message of "Tue, 28 Nov 2017 08:19:41 -0800")
Shakeel Butt <shakeelb@google.com> writes:
> The commit d6810d730022 ("memcg, THP, swap: make mem_cgroup_swapout()
> support THP") changed mem_cgroup_swapout() to support transparent huge
> page (THP). However the patch missed one location which should be
> changed for correctly handling THPs. The resulting bug will cause the
> memory cgroups whose THPs were swapped out to become zombies on
> deletion.
Good catch! Thanks a lot for fixing!
Best Regards,
Huang, Ying
> Fixes: d6810d730022 ("memcg, THP, swap: make mem_cgroup_swapout() support THP")
> Signed-off-by: Shakeel Butt <shakeelb@google.com>
> Cc: stable@vger.kernel.org
> ---
> mm/memcontrol.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 50e6906314f8..ac2ffd5e02b9 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -6044,7 +6044,7 @@ void mem_cgroup_swapout(struct page *page, swp_entry_t entry)
> memcg_check_events(memcg, page);
>
> if (!mem_cgroup_is_root(memcg))
> - css_put(&memcg->css);
> + css_put_many(&memcg->css, nr_entries);
> }
>
> /**
next prev parent reply other threads:[~2017-11-29 0:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-28 16:19 [PATCH] mm, memcg: fix mem_cgroup_swapout() for THPs Shakeel Butt
2017-11-28 20:00 ` Michal Hocko
2017-11-28 20:09 ` Shakeel Butt
2017-11-29 0:38 ` Huang, Ying [this message]
2017-11-29 10:17 ` 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=87o9nlc427.fsf@yhuang-dev.intel.com \
--to=ying.huang@intel.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=gthelen@google.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=shakeelb@google.com \
--cc=stable@vger.kernel.org \
--cc=vdavydov.dev@gmail.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).