From: Peter Zijlstra <peterz@infradead.org>
To: robert.foss@collabora.com
Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
x86@kernel.org, davem@davemloft.net, yinghan@google.com,
ast@fb.com, linux@rasmusvillemoes.dk, borntraeger@de.ibm.com,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@kernel.org>,
Rik van Riel <riel@redhat.com>,
Andrew Bresticker <abrestic@chromium.org>,
Sameer Nanda <snanda@chromium.org>,
Filipe Brandenburger <filbranden@chromium.org>,
Josh Poimboeuf <jpoimboe@redhat.com>
Subject: Re: [PACTH v9] stacktrace: Eliminate task stack trace duplication
Date: Wed, 17 Aug 2016 08:50:54 +0200 [thread overview]
Message-ID: <20160817065054.GO30192@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1471389156-8306-1-git-send-email-robert.foss@collabora.com>
On Tue, Aug 16, 2016 at 07:12:36PM -0400, robert.foss@collabora.com wrote:
> From: Ying Han <yinghan@google.com>
>
> The problem with small dmesg ring buffer like 512k is that only limited number
> of task traces will be logged. Sometimes we lose important information only
> because of too many duplicated stack traces. This problem occurs when dumping
> lots of stacks in a single operation, such as sysrq-T.
>
> This patch tries to reduce the duplication of task stack trace in the dump
> message by hashing the task stack. The hashtable is a 32k pre-allocated buffer
> during bootup. Each time if we find the identical task trace in the task stack,
> we dump only the pid of the task which has the task trace dumped. So it is easy
> to back track to the full stack with the pid.
>
> When we do the hashing, we eliminate garbage entries from stack traces. Those
> entries are still being printed in the dump to provide more debugging
> informations.
>
> [ 53.510162] kworker/0:0 S ffffffff8161d820 0 4 2 0x00000000
> [ 53.517237] ffff88027547de60 0000000000000046 ffffffff812ab840 0000000000000000
> [ 53.524663] ffff880275460080 ffff88027547dfd8 ffff88027547dfd8 ffff88027547dfd8
> [ 53.532092] ffffffff81813020 ffff880275460080 0000000000000000 ffff8808758670c0
> [ 53.539521] Call Trace:
> [ 53.541974] [<ffffffff812ab840>] ? cfq_init_queue+0x350/0x350
> [ 53.547791] [<ffffffff81524d49>] schedule+0x29/0x70
> [ 53.552761] [<ffffffff810945a3>] worker_thread+0x233/0x380
> [ 53.558318] [<ffffffff81094370>] ? manage_workers.isra.28+0x230/0x230
> [ 53.564839] [<ffffffff81099a73>] kthread+0x93/0xa0
> [ 53.569714] [<ffffffff8152e6d4>] kernel_thread_helper+0x4/0x10
> [ 53.575628] [<ffffffff810999e0>] ? kthread_worker_fn+0x140/0x140
> [ 53.581714] [<ffffffff8152e6d0>] ? gs_change+0xb/0xb
> [ 53.586762] kworker/u:0 S ffffffff8161d820 0 5 2 0x00000000
> [ 53.593858] ffff88027547fe60 0000000000000046 ffffffffa005cc70 0000000000000000
> [ 53.601307] ffff8802754627d0 ffff88027547ffd8 ffff88027547ffd8 ffff88027547ffd8
> [ 53.608788] ffffffff81813020 ffff8802754627d0 0000000000011fc0 ffff8804758670c0
> [ 53.616232] Call Trace:
> [ 53.618676] <Same stack as pid 4>
>
You might want to wait a bit and have a look at this:
https://lkml.kernel.org/r/cover.1471011425.git.jpoimboe@redhat.com
next prev parent reply other threads:[~2016-08-17 6:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-16 23:12 robert.foss
2016-08-17 6:50 ` Peter Zijlstra [this message]
2016-08-17 13:51 ` Robert Foss
2016-08-17 16:58 ` Josh Poimboeuf
2016-08-17 17:40 ` Robert Foss
2016-08-17 18:06 ` Josh Poimboeuf
2016-08-17 18:41 ` Robert Foss
2016-08-17 19:57 ` Josh Poimboeuf
2016-08-17 20:23 ` Robert Foss
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=20160817065054.GO30192@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=abrestic@chromium.org \
--cc=ast@fb.com \
--cc=borntraeger@de.ibm.com \
--cc=davem@davemloft.net \
--cc=filbranden@chromium.org \
--cc=hpa@zytor.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=riel@redhat.com \
--cc=robert.foss@collabora.com \
--cc=snanda@chromium.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=yinghan@google.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
Powered by JetHome