Re: [PATCH 2/5] mm/memcg: Introduce obj_cgroup_uncharge_mod_state()

From: Roman Gushchin
Date: Mon Apr 12 2021 - 14:10:49 EST


On Fri, Apr 09, 2021 at 07:18:39PM -0400, Waiman Long wrote:
> In memcg_slab_free_hook()/pcpu_memcg_free_hook(), obj_cgroup_uncharge()
> is followed by mod_objcg_state()/mod_memcg_state(). Each of these
> function call goes through a separate irq_save/irq_restore cycle. That
> is inefficient. Introduce a new function obj_cgroup_uncharge_mod_state()
> that combines them with a single irq_save/irq_restore cycle.
>
> Signed-off-by: Waiman Long <longman@xxxxxxxxxx>

Acked-by: Roman Gushchin <guro@xxxxxx>

Thanks!