[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210204183743.GB1837780@carbon.DHCP.thefacebook.com>
Date: Thu, 4 Feb 2021 10:37:43 -0800
From: Roman Gushchin <guro@...com>
To: Muchun Song <songmuchun@...edance.com>
CC: <hannes@...xchg.org>, <mhocko@...nel.org>,
<vdavydov.dev@...il.com>, <akpm@...ux-foundation.org>,
<cgroups@...r.kernel.org>, <linux-mm@...ck.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] mm: memcontrol: replace the loop with a
list_for_each_entry()
On Fri, Feb 05, 2021 at 12:30:55AM +0800, Muchun Song wrote:
> The rule of list walk has gone since:
>
> commit a9d5adeeb4b2 ("mm/memcontrol: allow to uncharge page without using page->lru field")
>
> So remove the strange comment and replace the loop with a
> list_for_each_entry().
>
> There is only one caller of the uncharge_list(). So just fold it into
> mem_cgroup_uncharge_list() and remove it.
>
> Signed-off-by: Muchun Song <songmuchun@...edance.com>
> ---
> v2:
> - Fold uncharge_list() to mem_cgroup_uncharge_list().
>
> mm/memcontrol.c | 35 ++++++++---------------------------
> 1 file changed, 8 insertions(+), 27 deletions(-)
Nice cleanup!
Acked-by: Roman Gushchin <guro@...com>
Thanks.
Powered by blists - more mailing lists