Thread (11 messages) 11 messages, 4 authors, 2022-09-09

Re: [PATCH 3/3] memcg: reduce size of memcg vmstats structures

From: Shakeel Butt <hidden>
Date: 2022-09-08 02:35:26
Also in: linux-mm, lkml

On Tue, Sep 6, 2022 at 9:36 PM Shakeel Butt [off-list ref] 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help