public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: "Liang, Kan" <kan.liang@linux.intel.com>
Cc: David Miller <davem@davemloft.net>,
	linux-kernel@vger.kernel.org, Wang Nan <wangnan0@huawei.com>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Kan Liang <kan.liang@intel.com>, Andi Kleen <ak@linux.intel.com>,
	Jin Yao <yao.jin@linux.intel.com>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: A concern about overflow ring buffer mode
Date: Fri, 26 Oct 2018 17:43:35 -0300	[thread overview]
Message-ID: <20181026204335.GK3353@kernel.org> (raw)
In-Reply-To: <4f84468f-37d9-cf1b-12c1-514ef74b6a48@linux.intel.com>

Em Fri, Oct 26, 2018 at 04:11:51PM -0400, Liang, Kan escreveu:
> 
> 
> On 10/26/2018 3:24 PM, Arnaldo Carvalho de Melo wrote:
> > Em Fri, Oct 26, 2018 at 03:16:29PM -0400, Liang, Kan escreveu:
> > > 
> > > 
> > > On 10/26/2018 3:12 PM, Arnaldo Carvalho de Melo wrote:
> > > > Em Fri, Oct 26, 2018 at 03:07:40PM -0400, Liang, Kan escreveu:
> > > > > On 10/26/2018 3:02 PM, Arnaldo Carvalho de Melo wrote:
> > > > > > So, I'm adding the following to my tree to help in diagnosing problems
> > > > > > with this overwrite mode:
> > > > > Actually, you can use per-event overwrite term to disable overwrite mode for
> > > > > perf top.
> > <SMIP>
> > > > I see, it will disable that opts->overwrite if it finds the no-overwrite
> > > > in the per-event definition, so the equivalent of the option I added
> > > > below:
> > 
> > > >        perf top --no-overwrite
> > 
> > > > is:
> > 
> > > >        perf top -e cycles/no-overwrite/
> > 
> > > > I checked and both have the same result. But I still think there is
> > > > value in having the shorter form, ok?
> > 
> > > Sure.
> > 
> > Ok.
> > 
> > I think that we should default back to --no-overwrite till we get this
> > sorted out, as the effect is easily noticeable, as David reported and I
> > reproduced, when doing kernel builds.
> 
> It is mainly for performance reason to switch to overwrite mode. The impact
> was very small when I did my test. But now the effect is easily noticeable
> in other tests. Yes, I agree. We may change it back to non-overwrite mode
> until the issue is addressed.

ok
 
> > On systems such as Knights Landing/Mill one can use --overwrite, knowing
> > about this current map resolving limitation, i.e. for workloads where
> > there are not that many short lived threads or mmap'ing, that could be
> > possibly tolerable.
 
> Could you please add this in the description of --overwrite?
> It looks like the --overwrite is not default anymore.
> +--overwrite::
> +	This is the default, but for investigating problems with it or any other
> strange
> +	behaviour like lots of unknown samples, we may want to disable this mode
> by using
> +	--no-overwrite.

Ok, when I make that change, then I'll change the documentation for the
option.
 
> > Fixing this properly will probably involve using the ordered_events code
> > and two evlist, one for the PERF_RECORD_!SAMPLE in non-overwrite mode
> > and the other for PERF_RECORD_SAMPLE in overwrite mode, else someone
> > comes up with some better solution :-)
> > 
> 
> Supporting both overwrite and non-overwrite mode?

Not on the same ring buffer, two ring buffers, one overwrite, the
other non-overwrite, get events from both and order, then consume, like
perf_session does now when processing perf.data files.

> I think that needs some changes in kernel. May need to split the ring buffer
> for different mode. I think it should be very complex.
> But I don't have a better solution for now. :)

  reply	other threads:[~2018-10-26 20:43 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-26 17:45 A concern about overflow ring buffer mode David Miller
2018-10-26 18:38 ` Arnaldo Carvalho de Melo
2018-10-26 18:42   ` Arnaldo Carvalho de Melo
2018-10-26 19:02     ` Arnaldo Carvalho de Melo
2018-10-26 19:07       ` Liang, Kan
2018-10-26 19:12         ` Arnaldo Carvalho de Melo
2018-10-26 19:16           ` Liang, Kan
2018-10-26 19:24             ` Arnaldo Carvalho de Melo
2018-10-26 20:11               ` Liang, Kan
2018-10-26 20:43                 ` Arnaldo Carvalho de Melo [this message]
2018-10-29 13:03                 ` [PATCHES/RFC] " Arnaldo Carvalho de Melo
2018-10-29 14:33                   ` Liang, Kan
2018-10-29 14:35                     ` Arnaldo Carvalho de Melo
2018-10-29 15:11                       ` Liang, Kan
2018-10-29 17:43                         ` David Miller
2018-10-29 17:56                           ` Arnaldo Carvalho de Melo
2018-10-29 17:40                     ` David Miller
2018-10-29 17:42                       ` Liang, Kan
2018-10-29 17:48                         ` David Miller
2018-10-29 18:20                           ` Liang, Kan
2018-10-29 18:32                             ` Arnaldo Carvalho de Melo
2018-10-29 22:32                               ` Liang, Kan
2018-10-29 22:42                                 ` David Miller
2018-10-30  1:54                                   ` Liang, Kan
2018-10-29 21:16                             ` David Miller
2018-10-29 17:55                       ` Arnaldo Carvalho de Melo
2018-10-30 19:05                     ` David Miller
2018-10-31 22:03                 ` [tip:perf/urgent] perf top: Do not use overwrite mode by default tip-bot for Arnaldo Carvalho de Melo

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=20181026204335.GK3353@kernel.org \
    --to=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@intel.com \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=wangnan0@huawei.com \
    --cc=yao.jin@linux.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