[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250312230114.GA1247787@cmpxchg.org>
Date: Wed, 12 Mar 2025 19:01:14 -0400
From: Johannes Weiner <hannes@...xchg.org>
To: Shakeel Butt <shakeel.butt@...ux.dev>
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,
cgroups@...r.kernel.org, linux-kernel@...r.kernel.org,
Meta kernel team <kernel-team@...a.com>
Subject: Re: [PATCH] memcg: move do_memsw_account() to CONFIG_MEMCG_V1
On Wed, Mar 12, 2025 at 03:25:52PM -0700, Shakeel Butt wrote:
> The do_memsw_account() is used to enable or disable legacy memory+swap
> accounting in memory cgroup. However with disabled CONFIG_MEMCG_V1, we
> don't need to keep checking it. So, let's always return false for
> !CONFIG_MEMCG_V1 configs.
>
> Before the patch:
>
> $ size mm/memcontrol.o
> text data bss dec hex filename
> 49928 10736 4172 64836 fd44 mm/memcontrol.o
>
> After the patch:
>
> $ size mm/memcontrol.o
> text data bss dec hex filename
> 49430 10480 4172 64082 fa52 mm/memcontrol.o
>
> Signed-off-by: Shakeel Butt <shakeel.butt@...ux.dev>
Nice. It being a jump label avoids the branch, but it's still
unnecessary text and therefor i$ burden on fairly hot paths.
Acked-by: Johannes Weiner <hannes@...xchg.org>
Powered by blists - more mailing lists