linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Daniel Colascione <dancol@google.com>
Cc: Qian Cai <cai@lca.pw>, Tim Murray <timmurray@google.com>,
	Suren Baghdasaryan <surenb@google.com>,
	linux-mm@vger.kernel.org,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-mm <linux-mm@kvack.org>
Subject: Re: [PATCH] Make SPLIT_RSS_COUNTING configurable
Date: Fri, 4 Oct 2019 14:33:49 +0200	[thread overview]
Message-ID: <20191004123349.GB10845@dhcp22.suse.cz> (raw)
In-Reply-To: <CAKOZuesKY_=qkSXfmDO_1ALaqQtU0kz5Z+fBh05c8BR7oCDxKw@mail.gmail.com>

On Wed 02-10-19 19:08:16, Daniel Colascione wrote:
> On Wed, Oct 2, 2019 at 6:56 PM Qian Cai <cai@lca.pw> wrote:
> > > On Oct 2, 2019, at 4:29 PM, Daniel Colascione <dancol@google.com> wrote:
> > >
> > > Adding the correct linux-mm address.
> > >
> > >
> > >> +config SPLIT_RSS_COUNTING
> > >> +       bool "Per-thread mm counter caching"
> > >> +       depends on MMU
> > >> +       default y if NR_CPUS >= SPLIT_PTLOCK_CPUS
> > >> +       help
> > >> +         Cache mm counter updates in thread structures and
> > >> +         flush them to visible per-process statistics in batches.
> > >> +         Say Y here to slightly reduce cache contention in processes
> > >> +         with many threads at the expense of decreasing the accuracy
> > >> +         of memory statistics in /proc.
> > >> +
> > >> endmenu
> >
> > All those vague words are going to make developers almost impossible to decide the right selection here. It sounds like we should kill SPLIT_RSS_COUNTING at all to simplify the code as the benefit is so small vs the side-effect?
> 
> Killing SPLIT_RSS_COUNTING would be my first choice; IME, on mobile
> and a basic desktop, it doesn't make a difference. I figured making it
> a knob would help allay concerns about the performance impact in more
> extreme configurations.

I do agree with Qian. Either it is really helpful (is it? probably on
the number of cpus) and it should be auto-enabled or it should be
dropped altogether. You cannot really expect people know how to enable
this without a deep understanding of the MM internals. Not to mention
all those users using distro kernels/configs.

A config option sounds like a bad way forward.

-- 
Michal Hocko
SUSE Labs

  reply	other threads:[~2019-10-04 12:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-02 20:24 Daniel Colascione
2019-10-02 20:28 ` Daniel Colascione
2019-10-03  1:56   ` Qian Cai
2019-10-03  2:08     ` Daniel Colascione
2019-10-04 12:33       ` Michal Hocko [this message]
2019-10-04 13:26         ` Kirill A. Shutemov
2019-10-04 13:45           ` Daniel Colascione
2019-10-04 14:43             ` Michal Hocko
2019-10-07  0:11             ` Kirill A. Shutemov

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=20191004123349.GB10845@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=cai@lca.pw \
    --cc=dancol@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-mm@vger.kernel.org \
    --cc=surenb@google.com \
    --cc=timmurray@google.com \
    --subject='Re: [PATCH] Make SPLIT_RSS_COUNTING configurable' \
    /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

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).