LKML Archive on
help / color / mirror / Atom feed
From: Linus Torvalds <>
To: Shakeel Butt <>
Cc: Johannes Weiner <>,
	Andrew Morton <>,
	kernel test robot <>, LKP <>,
	LKML <>,
	Michal Hocko <>, Roman Gushchin <>,
	Linux MM <>, Cgroups <>
Subject: Re: [PATCH] mm: memcontrol: don't batch updates of local VM stats and events
Date: Tue, 28 May 2019 10:37:15 -0700	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Tue, May 28, 2019 at 9:00 AM Shakeel Butt <> wrote:
> I was suspecting the following for-loop+atomic-add for the regression.

If I read the kernel test robot reports correctly, Johannes' fix patch
does fix the regression (well - mostly. The original reported
regression was 26%, and with Johannes' fix patch it was 3% - so still
a slight performance regression, but not nearly as bad).

> Why the above atomic-add is the culprit?

I think the problem with that one is that it's cross-cpu statistics,
so you end up with lots of cacheline bounces on the local counts when
you have lots of load.

But yes, the recursive updates still do show a small regression,
probably because there's still some overhead from the looping up in
the hierarchy. You still get *those* cacheline bounces, but now they
are limited to the upper hierarchies that only get updated at batch

Johannes? Am I reading this right?


  reply	other threads:[~2019-05-28 17:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-20  6:35 [mm] 42a3003535: will-it-scale.per_process_ops -25.9% regression kernel test robot
2019-05-20 21:53 ` Johannes Weiner
2019-05-21 13:46   ` [LKP] " kernel test robot
2019-05-21 15:13     ` Johannes Weiner
2019-05-21 15:16     ` [PATCH] mm: memcontrol: don't batch updates of local VM stats and events Johannes Weiner
2019-05-28 16:00       ` Shakeel Butt
2019-05-28 17:37         ` Linus Torvalds [this message]
2019-05-28 20:32           ` Johannes Weiner

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:

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

  git send-email \
    --in-reply-to='' \ \ \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH] mm: memcontrol: don'\''t batch updates of local VM stats and events' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).