[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALvZod7yPUMuakhmaKV8Z0DVr0RO1pyw9vW7YOkmDH=oW3xyDA@mail.gmail.com>
Date: Tue, 16 Jun 2020 18:52:09 -0700
From: Shakeel Butt <shakeelb@...gle.com>
To: Roman Gushchin <guro@...com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Christoph Lameter <cl@...ux.com>,
Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...nel.org>,
Linux MM <linux-mm@...ck.org>,
Vlastimil Babka <vbabka@...e.cz>,
Kernel Team <kernel-team@...com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v6 01/19] mm: memcg: factor out memcg- and lruvec-level
changes out of __mod_lruvec_state()
On Mon, Jun 8, 2020 at 4:07 PM Roman Gushchin <guro@...com> wrote:
>
> To convert memcg and lruvec slab counters to bytes there must be
> a way to change these counters without touching node counters.
> Factor out __mod_memcg_lruvec_state() out of __mod_lruvec_state().
>
> Signed-off-by: Roman Gushchin <guro@...com>
> Acked-by: Johannes Weiner <hannes@...xchg.org>
> Reviewed-by: Vlastimil Babka <vbabka@...e.cz>
> ---
> include/linux/memcontrol.h | 17 +++++++++++++++
> mm/memcontrol.c | 43 +++++++++++++++++++++-----------------
> 2 files changed, 41 insertions(+), 19 deletions(-)
>
> diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
> index bbf624a7f5a6..93dbc7f9d8b8 100644
> --- a/include/linux/memcontrol.h
> +++ b/include/linux/memcontrol.h
> @@ -679,11 +679,23 @@ static inline unsigned long lruvec_page_state_local(struct lruvec *lruvec,
> return x;
> }
>
> +void __mod_memcg_lruvec_state(struct lruvec *lruvec, enum node_stat_item idx,
> + int val);
> void __mod_lruvec_state(struct lruvec *lruvec, enum node_stat_item idx,
> int val);
> void __mod_lruvec_slab_state(void *p, enum node_stat_item idx, int val);
> void mod_memcg_obj_state(void *p, int idx, int val);
>
> +static inline void mod_memcg_lruvec_state(struct lruvec *lruvec,
> + enum node_stat_item idx, int val)
Is this function used in later patches? Any benefit introducing it
here instead of in the patch where it is used for the first time?
> +{
> + unsigned long flags;
> +
> + local_irq_save(flags);
> + __mod_memcg_lruvec_state(lruvec, idx, val);
> + local_irq_restore(flags);
> +}
> +
[...]
Powered by blists - more mailing lists