linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Shakeel Butt <shakeel.butt@linux.dev>
To: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org,  linux-kernel@vger.kernel.org,
	Johannes Weiner <hannes@cmpxchg.org>,
	 Michal Hocko <mhocko@kernel.org>,
	Muchun Song <muchun.song@linux.dev>,
	 kernel test robot <oliver.sang@intel.com>
Subject: Re: [PATCH] mm: memcg: add cacheline padding after lruvec in mem_cgroup_per_node
Date: Tue, 23 Jul 2024 10:30:31 -0700	[thread overview]
Message-ID: <4xrfzyqmmq5gmowvyxxqn2xogo4o3rktc2btces3zeamhnaoxz@kor2cgbm46ou> (raw)
In-Reply-To: <20240723171244.747521-1-roman.gushchin@linux.dev>

On Tue, Jul 23, 2024 at 05:12:44PM GMT, Roman Gushchin wrote:
> Oliver Sand 

Oliver Sang

> reported a performance regression caused by
> commit 98c9daf5ae6b ("mm: memcg: guard memcg1-specific members of struct
> mem_cgroup_per_node"), which puts some fields of the
> mem_cgroup_per_node structure under the CONFIG_MEMCG_V1 config option.
> Apparently it causes a false cache sharing between lruvec and
> lru_zone_size members of the structure. Fix it by adding an explicit
> padding after the lruvec member.
> 
> Even though the padding is not required with CONFIG_MEMCG_V1 set,
> it seems like the introduced memory overhead is not significant
> enough to warrant another divergence in the mem_cgroup_per_node
> layout, so the padding is added unconditionally.
> 
> Fixes: 98c9daf5ae6b ("mm: memcg: guard memcg1-specific members of struct mem_cgroup_per_node")
> Reported-by: kernel test robot <oliver.sang@intel.com>
> Closes: https://lore.kernel.org/oe-lkp/202407121335.31a10cb6-oliver.sang@intel.com
> Tested-by: Oliver Sang <oliver.sang@intel.com>
> Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev>

Acked-by: Shakeel Butt <shakeel.butt@linux.dev>


      reply	other threads:[~2024-07-23 17:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-23 17:12 Roman Gushchin
2024-07-23 17:30 ` Shakeel Butt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4xrfzyqmmq5gmowvyxxqn2xogo4o3rktc2btces3zeamhnaoxz@kor2cgbm46ou \
    --to=shakeel.butt@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=muchun.song@linux.dev \
    --cc=oliver.sang@intel.com \
    --cc=roman.gushchin@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox