[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YQOhbwhJWuk5NOro@dhcp22.suse.cz>
Date: Fri, 30 Jul 2021 08:51:27 +0200
From: Michal Hocko <mhocko@...e.com>
To: Miaohe Lin <linmiaohe@...wei.com>
Cc: hannes@...xchg.org, vdavydov.dev@...il.com,
akpm@...ux-foundation.org, shakeelb@...gle.com, guro@...com,
willy@...radead.org, alexs@...nel.org, richard.weiyang@...il.com,
songmuchun@...edance.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, cgroups@...r.kernel.org
Subject: Re: [PATCH 3/5] mm, memcg: save some atomic ops when flush is
already true
On Thu 29-07-21 20:57:53, Miaohe Lin wrote:
> Add 'else' to save some atomic ops in obj_stock_flush_required() when
> flush is already true. No functional change intended here.
>
> Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>
Acked-by: Michal Hocko <mhocko@...e.com>
> ---
> mm/memcontrol.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index a03e24e57cd9..5b4592d1e0f2 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -2231,7 +2231,7 @@ static void drain_all_stock(struct mem_cgroup *root_memcg)
> if (memcg && stock->nr_pages &&
> mem_cgroup_is_descendant(memcg, root_memcg))
> flush = true;
> - if (obj_stock_flush_required(stock, root_memcg))
> + else if (obj_stock_flush_required(stock, root_memcg))
> flush = true;
> rcu_read_unlock();
>
> --
> 2.23.0
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists