[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c8e88092-ddbe-2934-aa61-5db6cbad0c11@arm.com>
Date: Thu, 28 Nov 2019 15:32:51 +0530
From: Anshuman Khandual <anshuman.khandual@....com>
To: Hao Lee <haolee.swjtu@...il.com>, akpm@...ux-foundation.org
Cc: mgorman@...e.de, linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: use the existing variable instead of a duplicate
statement
On 11/25/2019 08:23 PM, Hao Lee wrote:
> The address of zone has been stored in variable 'zone', so there is no need
> to get it again with a duplicate statement.
>
> Signed-off-by: Hao Lee <haolee.swjtu@...il.com>
> ---
> mm/vmscan.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index ee4eecc7e1c2..de4b2d1e66be 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -363,22 +363,21 @@ unsigned long lruvec_lru_size(struct lruvec *lruvec, enum lru_list lru, int zone
> for (zid = zone_idx + 1; zid < MAX_NR_ZONES; zid++) {
> struct zone *zone = &lruvec_pgdat(lruvec)->node_zones[zid];
> unsigned long size;
>
> if (!managed_zone(zone))
> continue;
>
> if (!mem_cgroup_disabled())
> size = mem_cgroup_get_zone_lru_size(lruvec, lru, zid);
> else
> - size = zone_page_state(&lruvec_pgdat(lruvec)->node_zones[zid],
> - NR_ZONE_LRU_BASE + lru);
> + size = zone_page_state(zone, NR_ZONE_LRU_BASE + lru);
Is not this already merged with following commit on next-20191126 ?
54eacdb0dd8f9a ("mm: vmscan: simplify lruvec_lru_size()")
> lru_size -= min(size, lru_size);
> }
>
> return lru_size;
>
> }
>
> /*
> * Add a shrinker callback to be called from the vm.
> */
>
Powered by blists - more mailing lists