linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: kemi <kemi.wang@intel.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>,
	"Luis R . Rodriguez" <mcgrof@kernel.org>,
	Kees Cook <keescook@chromium.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Mel Gorman <mgorman@techsingularity.net>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Christopher Lameter <cl@linux.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Vlastimil Babka <vbabka@suse.cz>,
	Hillf Danton <hillf.zj@alibaba-inc.com>,
	Tim Chen <tim.c.chen@intel.com>,
	Andi Kleen <andi.kleen@intel.com>,
	Jesper Dangaard Brouer <brouer@redhat.com>,
	Ying Huang <ying.huang@intel.com>, Aaron Lu <aaron.lu@intel.com>,
	Proc sysctl <linux-fsdevel@vger.kernel.org>,
	Linux MM <linux-mm@kvack.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] mm, sysctl: make VM stats configurable
Date: Mon, 18 Sep 2017 07:50:06 +0200	[thread overview]
Message-ID: <20170918055006.zuegpj6wjzwq6ijb@dhcp22.suse.cz> (raw)
In-Reply-To: <acbff0c6-ddd8-3843-597c-99cfadcd4e61@intel.com>

On Mon 18-09-17 10:44:52, kemi wrote:
> 
> 
> On 2017a1'09ae??15ae?JPY 22:28, Michal Hocko wrote:
> > On Fri 15-09-17 07:16:23, Dave Hansen wrote:
> >> On 09/15/2017 04:49 AM, Michal Hocko wrote:
> >>> Why do we need an auto-mode? Is it safe to enforce by default.
> >>
> >> Do we *need* it?  Not really.
> >>
> >> But, it does offer the best of both worlds: The vast majority of users
> >> see virtually no impact from the counters.  The minority that do need
> >> them pay the cost *and* don't have to change their tooling at all.
> > 
> > Just to make it clear, I am not really opposing. It just adds some code
> > which we can safe... It is also rather chatty for something that can be
> > true/false.
> > 
> 
> It has benefit, as Dave mentioned above.
> Actually, it adds some coding complexity to provide a tuning interface with
> on/off/auto mode. Using human-readable string instead of magic number makes
> it easier to use, people probably don't need to review the ABI doc again
> before using it. So, I don't think that should be a problem 

Is this a thing that would be changed very often. I suspect that once
needed it will be set in a startup sysctl configuration and there will
be no further need to touch it again.

> >>> Is it> possible that userspace can get confused to see 0 NUMA stats in
> >> the
> >>> first read while other allocation stats are non-zero?
> >>
> >> I doubt it.  Those counters are pretty worthless by themselves.  I have
> >> tooling that goes and reads them, but it aways displays deltas.  Read
> >> stats, sleep one second, read again, print the difference.
> > 
> > This is how I use them as well.
> >  
> >> The only scenario I can see mattering is someone who is seeing a
> >> performance issue due to NUMA allocation misses (or whatever) and wants
> >> to go look *back* in the past.
> > 
> > yes
> > 
> 
> If it really matters, setting vmstat_mode=strict as a default option is a simple 
> way to fix it. What's your idea? thanks

Well, we are usually very conservative when changing the default
behavior. The primary reason why I was asking is that the auto mode
doesn't make much sense unless it is the default. I fully realize that
such an hypothetical breakage is really hard to envision but considering
it is more code to allow auto mode than a simple on/off (we have parsing
helpers for that AFAIR) then I would rather go with the simpler option.

This is up to you of course.
-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2017-09-18  5:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-15  9:23 [PATCH 0/3] Handle zone statistics distinctively based-on Kemi Wang
2017-09-15  9:23 ` [PATCH 1/3] mm, sysctl: make VM stats configurable Kemi Wang
2017-09-15 11:49   ` Michal Hocko
2017-09-15 14:16     ` Dave Hansen
2017-09-15 14:28       ` Michal Hocko
2017-09-18  2:44         ` kemi
2017-09-18  5:50           ` Michal Hocko [this message]
2017-09-16  2:10     ` Wang, Kemi
2017-09-18  3:22     ` kemi
2017-09-18  5:50       ` Michal Hocko
2017-09-15  9:23 ` [PATCH 2/3] mm: Handle numa statistics distinctively based-on different VM stats modes Kemi Wang
2017-09-15 11:50   ` Michal Hocko
2017-09-18  3:07     ` kemi
2017-09-18  4:13       ` Dave Hansen
2017-09-18  5:05         ` kemi
2017-09-15  9:23 ` [PATCH 3/3] sysctl/vm.txt: Update document Kemi Wang

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=20170918055006.zuegpj6wjzwq6ijb@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=aaron.lu@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi.kleen@intel.com \
    --cc=bigeasy@linutronix.de \
    --cc=brouer@redhat.com \
    --cc=cl@linux.com \
    --cc=corbet@lwn.net \
    --cc=dave.hansen@linux.intel.com \
    --cc=hannes@cmpxchg.org \
    --cc=hillf.zj@alibaba-inc.com \
    --cc=keescook@chromium.org \
    --cc=kemi.wang@intel.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mcgrof@kernel.org \
    --cc=mgorman@techsingularity.net \
    --cc=tim.c.chen@intel.com \
    --cc=vbabka@suse.cz \
    --cc=ying.huang@intel.com \
    /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