[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e42db54b94ebf8ca3ee14bb41850184750d2b23c@linux.dev>
Date: Sat, 20 Apr 2024 17:25:04 +0000
From: shakeel.butt@...ux.dev
To: "Johannes Weiner" <hannes@...xchg.org>
Cc: "Andrew Morton" <akpm@...ux-foundation.org>, "Michal Hocko"
<mhocko@...nel.org>, "Roman Gushchin" <roman.gushchin@...ux.dev>, "Muchun
Song" <muchun.song@...ux.dev>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] memcg: simple cleanup of stats update functions
April 20, 2024 at 6:23 AM, "Johannes Weiner" <hannes@...xchg.org> wrote:
>
> Hi Shakeel,
>
> On Fri, Apr 19, 2024 at 04:39:49PM -0700, Shakeel Butt wrote:
>
> >
> > @@ -2983,10 +2984,6 @@ void mem_cgroup_commit_charge(struct folio *folio, struct mem_cgroup *memcg)
> >
> >
> >
> > #ifdef CONFIG_MEMCG_KMEM
> >
> >
> >
> > -/*
> >
> > - * mod_objcg_mlstate() may be called with irq enabled, so
> >
> > - * mod_memcg_lruvec_state() should be used.
> >
> > - */
> >
> > static inline void mod_objcg_mlstate(struct obj_cgroup *objcg,
> >
> > struct pglist_data *pgdat,
> >
> > enum node_stat_item idx, int nr)
> >
> > @@ -2994,10 +2991,12 @@ static inline void mod_objcg_mlstate(struct obj_cgroup *objcg,
> >
> > struct mem_cgroup *memcg;
> >
> > struct lruvec *lruvec;
> >
> >
> >
> > + lockdep_assert_irqs_disabled();
> >
> > +
> >
> > rcu_read_lock();
> >
> > memcg = obj_cgroup_memcg(objcg);
> >
> > lruvec = mem_cgroup_lruvec(memcg, pgdat);
> >
> > - mod_memcg_lruvec_state(lruvec, idx, nr);
> >
> > + __mod_memcg_lruvec_state(lruvec, idx, nr);
> >
> > rcu_read_unlock();
> >
> > }
> >
>
> Best to rename it to __mod_objcg_mlstate() as well to follow the
>
> naming pattern for whether caller or callee handles IRQ toggling?
Will do shortly in v2.
>
> Otherwise, looks great to me!
>
> Acked-by: Johannes Weiner <hannes@...xchg.org>
Thanks a lot.
Powered by blists - more mailing lists