From: Michal Hocko <mhocko@kernel.org>
To: Richard Cochran <rcochran@linutronix.de>
Cc: linux-kernel@vger.kernel.org, rt@linutronix.de,
Johannes Weiner <hannes@cmpxchg.org>,
Vladimir Davydov <vdavydov@virtuozzo.com>,
cgroups@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH 1/5] mm: memcontrol: Remove redundant hot plug notifier test.
Date: Mon, 21 Mar 2016 09:17:17 +0100 [thread overview]
Message-ID: <20160321081717.GA21248@dhcp22.suse.cz> (raw)
In-Reply-To: <1458336371-17748-1-git-send-email-rcochran@linutronix.de>
On Fri 18-03-16 22:26:07, Richard Cochran wrote:
> The test for ONLINE is redundant because the following test for !DEAD
> already includes the online case. This patch removes the superfluous
> code.
The code used to do something specific to CPU_ONLINE in the past but now
it really seems to be pointless and maybe even confusing. All we really
care here is when the cpu goes down and we need to drain per-cpu cached
charges.
> Cc: Johannes Weiner <hannes@cmpxchg.org>
> Cc: Michal Hocko <mhocko@kernel.org>
> Cc: Vladimir Davydov <vdavydov@virtuozzo.com>
> Cc: cgroups@vger.kernel.org
> Cc: linux-mm@kvack.org
> Signed-off-by: Richard Cochran <rcochran@linutronix.de>
Acked-by: Michal Hocko <mhocko@suse.com>
Thanks
> ---
> mm/memcontrol.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index d06cae2..993a261 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -1916,9 +1916,6 @@ static int memcg_cpu_hotplug_callback(struct notifier_block *nb,
> int cpu = (unsigned long)hcpu;
> struct memcg_stock_pcp *stock;
>
> - if (action == CPU_ONLINE)
> - return NOTIFY_OK;
> -
> if (action != CPU_DEAD && action != CPU_DEAD_FROZEN)
> return NOTIFY_OK;
>
> --
> 2.1.4
--
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>
prev parent reply other threads:[~2016-03-21 8:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-18 21:26 [PATCH 1/5] mm: memcontrol: Remove redundant hot plug notifier test Richard Cochran
2016-03-21 8:17 ` Michal Hocko [this message]
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=20160321081717.GA21248@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rcochran@linutronix.de \
--cc=rt@linutronix.de \
--cc=vdavydov@virtuozzo.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).