From: Peter Zijlstra <peterz@infradead.org>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Ingo Molnar <mingo@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>, Tejun Heo <tj@kernel.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>,
Dmitry Vyukov <dvyukov@google.com>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] sched/debug: Use terse backtrace for idly sleeping threads.
Date: Thu, 19 Jul 2018 15:46:53 +0200 [thread overview]
Message-ID: <20180719134653.GH2476@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <1532007443-3538-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp>
On Thu, Jul 19, 2018 at 10:37:23PM +0900, Tetsuo Handa wrote:
> This patch can be applied before proposing abovementioned changes.
> Since there are many kernel threads whose backtrace is boring due to idly
> waiting for an event inside the main loop, this patch introduces a kernel
> config option (which allows SysRq-t to use one-liner backtrace for threads
> idly waiting for an event) and simple helpers (which allow current thread
> to declare that current thread is about to start/end idly waiting).
> diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c
> index f776807..6b8c8bd 100644
> --- a/drivers/base/devtmpfs.c
> +++ b/drivers/base/devtmpfs.c
> @@ -406,7 +406,9 @@ static int devtmpfsd(void *p)
> }
> __set_current_state(TASK_INTERRUPTIBLE);
> spin_unlock(&req_lock);
> + start_idle_sleeping();
> schedule();
> + end_idle_sleeping();
> }
> return 0;
> out:
So I _really_ hate the idea of sprinking that all around the kernel like
this.
next prev parent reply other threads:[~2018-07-19 13:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-19 13:37 [RFC PATCH] sched/debug: Use terse backtrace for idly sleeping threads Tetsuo Handa
2018-07-19 13:46 ` Peter Zijlstra [this message]
2018-07-20 13:27 ` Tetsuo Handa
2018-07-20 14:04 ` David Laight
2018-07-21 11:31 ` 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=20180719134653.GH2476@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=dvyukov@google.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mingo@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
/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).