linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
To: Mel Gorman <mgorman@techsingularity.net>,
	Michal Hocko <mhocko@kernel.org>
Cc: peter.enderborg@sony.com, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>,
	Alex Deucher <alexander.deucher@amd.com>,
	"David S . Miller" <davem@davemloft.net>,
	Harry Wentland <Harry.Wentland@amd.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Tony Cheng <Tony.Cheng@amd.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Vlastimil Babka <vbabka@suse.cz>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Pavel Tatashin <pasha.tatashin@oracle.com>
Subject: Re: [PATCH] Add slowpath enter/exit trace events
Date: Thu, 23 Nov 2017 22:43:03 +0900	[thread overview]
Message-ID: <640b7de7-c216-de34-18e8-dc1aacd19f35@I-love.SAKURA.ne.jp> (raw)
In-Reply-To: <20171123133629.5sgmapfg7gix7pu3@techsingularity.net>

On 2017/11/23 22:36, Mel Gorman wrote:
> On Thu, Nov 23, 2017 at 01:25:30PM +0100, Michal Hocko wrote:
>> On Thu 23-11-17 11:43:36, peter.enderborg@sony.com wrote:
>>> From: Peter Enderborg <peter.enderborg@sony.com>
>>>
>>> The warning of slow allocation has been removed, this is
>>> a other way to fetch that information. But you need
>>> to enable the trace. The exit function also returns
>>> information about the number of retries, how long
>>> it was stalled and failure reason if that happened.
>>
>> I think this is just too excessive. We already have a tracepoint for the
>> allocation exit. All we need is an entry to have a base to compare with.
>> Another usecase would be to measure allocation latency. Information you
>> are adding can be (partially) covered by existing tracepoints.
>>
> 
> You can gather that by simply adding a probe to __alloc_pages_slowpath
> (like what perf probe does) and matching the trigger with the existing
> mm_page_alloc points. This is a bit approximate because you would need
> to filter mm_page_alloc hits that do not have a corresponding hit with
> __alloc_pages_slowpath but that is easy.
> 
> With that probe, it's trivial to use systemtap to track the latencies between
> those points on a per-processes basis and then only do a dump_stack from
> systemtap for the ones that are above a particular threshold. This can all
> be done without introducing state-tracking code into the page allocator
> that is active regardless of whether the tracepoint is in use. It also
> has the benefit of working with many older kernels.

Please see my attempt at
http://lkml.kernel.org/r/1510833448-19918-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp .
Printing just current thread is not sufficient for me.

  reply	other threads:[~2017-11-23 13:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-23 10:43 [PATCH] Add slowpath enter/exit trace events peter.enderborg
2017-11-23 12:25 ` Michal Hocko
2017-11-23 12:35   ` peter enderborg
2017-11-23 12:47     ` Michal Hocko
2017-11-23 13:03       ` peter enderborg
2017-11-23 13:47         ` Michal Hocko
2017-11-23 13:36   ` Mel Gorman
2017-11-23 13:43     ` Tetsuo Handa [this message]
2017-11-24  7:43       ` peter enderborg
2017-11-23 14:01     ` Michal Hocko
2017-11-23 15:09       ` Mel Gorman
2017-11-24  8:38       ` peter enderborg
2017-11-23 13:00 ` Tetsuo Handa

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=640b7de7-c216-de34-18e8-dc1aacd19f35@I-love.SAKURA.ne.jp \
    --to=penguin-kernel@i-love.sakura.ne.jp \
    --cc=Harry.Wentland@amd.com \
    --cc=Tony.Cheng@amd.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.deucher@amd.com \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@kernel.org \
    --cc=mingo@redhat.com \
    --cc=pasha.tatashin@oracle.com \
    --cc=peter.enderborg@sony.com \
    --cc=rostedt@goodmis.org \
    --cc=vbabka@suse.cz \
    /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;
as well as URLs for NNTP newsgroup(s).