From: Johannes Weiner Subject: Re: [PATCH v2 1/1] mm, memcg: inline mem_cgroup_{charge/uncharge} to improve disabled memcg config Date: Mon, 12 Jul 2021 14:31:27 -0400 Message-ID: References: <20210709171554.3494654-1-surenb@google.com> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=91QVBsn60C5sxxxstdN+oyAoFM1Vz8Xrhf5wNCClAZ0=; b=a019hXVML1QTTEfMxq4xOcak1XJogepYRETIyj3+hyPTloWky9q429jsqUoXR7NVUp x0sleTMvkwrpFBp5Iq492/WoP65dbpZlQV0HMy3pWuYArruuTgwsz2kNgmgvcfB0Uf8A zDuf0ZV/XAINwDV7rOhVLr2StoZ41vBZMq4y+WzvgRTKLKILuFcPWYjse+WchS9SplIV aQi/Q0AzrsPNr6udTmAyz7xaxLOL4RHnMtQohfkumhs2UOheE+1WjeKcsex9RZix8MRU IVEcs/d+bN2CTr2OCyJfFWTq0bnSxNX0smTokjuWD78ZfZS/wzfyHrDGXqBkR8ux7Lx7 4MOg== Content-Disposition: inline In-Reply-To: <20210709171554.3494654-1-surenb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Suren Baghdasaryan Cc: tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, mhocko-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, vdavydov.dev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org, shakeelb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, guro-b10kYP2dOMg@public.gmane.org, songmuchun-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org, shy828301-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, alexs-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, richard.weiyang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, vbabka-AlSwsSmVLrQ@public.gmane.org, axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org, iamjoonsoo.kim-Hm3cg6mZ9cc@public.gmane.org, david-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, willy-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org, apopple-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org, minchan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, linmiaohe-hv44wF8Li93QT0dZR+AlfA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, kernel-team-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org On Fri, Jul 09, 2021 at 10:15:54AM -0700, Suren Baghdasaryan wrote: > Inline mem_cgroup_{charge/uncharge} and mem_cgroup_uncharge_list functions > functions to perform mem_cgroup_disabled static key check inline before > calling the main body of the function. This minimizes the memcg overhead > in the pagefault and exit_mmap paths when memcgs are disabled using > cgroup_disable=memory command-line option. > This change results in ~0.4% overhead reduction when running PFT test > comparing {CONFIG_MEMCG=n} against {CONFIG_MEMCG=y, cgroup_disable=memory} > configurationon on an 8-core ARM64 Android device. > > Signed-off-by: Suren Baghdasaryan Acked-by: Johannes Weiner Thanks!