[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALvZod70Mvxr+Nzb6k0yiU2RFYjTD=0NFhKK-Eyp+5ejd1PSFw@mail.gmail.com>
Date: Wed, 7 Sep 2022 19:35:10 -0700
From: Shakeel Butt <shakeelb@...gle.com>
To: Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...nel.org>,
Roman Gushchin <roman.gushchin@...ux.dev>,
Muchun Song <songmuchun@...edance.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Cgroups <cgroups@...r.kernel.org>, Linux MM <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/3] memcg: reduce size of memcg vmstats structures
On Tue, Sep 6, 2022 at 9:36 PM Shakeel Butt <shakeelb@...gle.com> wrote:
>
[...]
>
> static unsigned long memcg_events_local(struct mem_cgroup *memcg, int event)
> {
> long x = 0;
> int cpu;
> + int index = memcg_events_index(event);
> +
> + if (index < 0)
> + return 0;
>
> for_each_possible_cpu(cpu)
> x += per_cpu(memcg->vmstats_percpu->events[event], cpu);
Andrew, can you please replace 'event' in the above line with 'index'?
I had this correct in the original single patch but messed up while
breaking up that patch into three patches for easier review.
Powered by blists - more mailing lists