From: Roman Gushchin Subject: Re: [PATCH 2/5] mm/memcg: Introduce obj_cgroup_uncharge_mod_state() Date: Mon, 12 Apr 2021 11:10:21 -0700 Message-ID: References: <20210409231842.8840-1-longman@redhat.com> <20210409231842.8840-3-longman@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=date : from : to : cc : subject : message-id : references : content-type : in-reply-to : mime-version; s=facebook; bh=weMYcAe94mdC/xewN3/3e72atG668XwPCObPWeBweY0=; b=EMLq6T859mVY62rS9tY8wGrSKhTjGui6uE22slhrhj0COu7lmuWD7IlodGxMOLy1GRIH aKfATAq3of2+LdFUfuophL2P9/Jg5xssR+CGJNRcPq74AnxhxZAkcKPsUKzEEbqPXEbC 5yOdpAwOX0P7IyQ5A0FOyUpEAh2bPrHFBLg= Content-Disposition: inline In-Reply-To: <20210409231842.8840-3-longman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> List-ID: Content-Transfer-Encoding: 7bit To: Waiman Long Cc: Johannes Weiner , Michal Hocko , Vladimir Davydov , Andrew Morton , Tejun Heo , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Vlastimil Babka , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, Shakeel Butt , Muchun Song , Alex Shi , Chris Down , Yafang Shao , Alexander Duyck , Wei Yang , Masayoshi Mizuma 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 Acked-by: Roman Gushchin Thanks!