public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Walker <dwalker@fifo99.com>
To: Mandeep Baines <msb@google.com>
Cc: fweisbec@gmail.com, sshaiju@mvista.com, mingo@elte.hu,
	akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: hung_task checking and sys_sync
Date: Tue, 12 Jun 2012 15:57:19 -0700	[thread overview]
Message-ID: <20120612225719.GA13605@fifo99.com> (raw)
In-Reply-To: <CACBanvo7DxYPWEtSAWV25Xq94vqJBugMAwbrEHz9DfSFTpSL_w@mail.gmail.com>

On Tue, Jun 12, 2012 at 03:45:20PM -0700, Mandeep Baines wrote:
> On Tue, Jun 12, 2012 at 3:34 PM, Daniel Walker <dwalker@fifo99.com> wrote:
> > On Tue, Jun 12, 2012 at 03:29:12PM -0700, Mandeep Singh Baines wrote:
> >>
> >> But the time is not unbounded. You could mask the hung_task_detector for
> >> this case but then you lose the ability to catch bugs in this code path.
> >>
> >> The timeout is configurable via /proc/sys/kernel/hung_task_timeout_secs.
> >> Can you bump up the value at boot via sysctl.conf?
> >
> > Maybe, but I'm wondering if these types should just be stopped because Andrew
> > had complained about them already.
> >
> 
> Fair enough. Actually, internally I had a patch where we'd use a task
> flag to disable and enable the hang check but the approach in the
> patch you pointed me to seems better.

I'm not really in love with it actually.. It's not ifdef'd for one, but
it's also changing potentially good kernel behavior to avoid warnings.
 
> >> > Has there been any commit that disable these messages bdi_sched_wait?
> >> >
> >>
> >> No. There is no mechanism to disable hung_task for a specific code path.
> >> We do skip processes if PF_PROZEN or PF_FROZEN_SKIP is set but that is
> >> really a different situation where the wait is unbounded.
> >
> > There is presidence for this type of change,
> >
> > Author: Mark Lord <kernel@teksavvy.com>
> > Date:   Fri Sep 24 09:51:13 2010 -0400
> >
> >    block: Prevent hang_check firing during long I/O
> >
> >    During long I/O operations, the hang_check timer may fire,
> >    trigger stack dumps that unnecessarily alarm the user.
> >
> >    Eg.  hdparm --security-erase NULL /dev/sdb  ## can take *hours* to complete
> >
> >    So, if hang_check is armed, we should wake up periodically
> >    to prevent it from triggering.  This patch uses a wake-up interval
> >    equal to half the hang_check timer period, which keeps overhead low enough.
> >
> >    Signed-off-by: Mark Lord <mlord@pobox.com>
> >    Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
> >
> 
> Interesting. I wasn't aware of this patch. Maybe we could abstract
> this approach via wait_for_completion_no_hang_check().

Could be .. You could put a stack structure into a list of tasks that
should be ignored prior to the task sleeping. Then when the thread wakes
the stack structure could be removed. Then that list get checked
during the hung task checking.

Daniel

  reply	other threads:[~2012-06-12 22:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-12 22:09 hung_task checking and sys_sync Daniel Walker
2012-06-12 22:29 ` Mandeep Singh Baines
2012-06-12 22:34   ` Daniel Walker
2012-06-12 22:45     ` Mandeep Baines
2012-06-12 22:57       ` Daniel Walker [this message]
2012-06-13  1:03         ` Muthu Kumar
2012-06-13 15:43           ` Daniel Walker
2012-06-13  3:02       ` Sadasivan Shaiju

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=20120612225719.GA13605@fifo99.com \
    --to=dwalker@fifo99.com \
    --cc=akpm@linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=msb@google.com \
    --cc=sshaiju@mvista.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