linux-bcache.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: majianpeng <majianpeng@gmail.com>
To: kmo <kmo@daterainc.com>
Cc: linux-bcache <linux-bcache@vger.kernel.org>
Subject: Re: Re: [PATCH 2/3] bcache: Avoid hung task happen.
Date: Thu, 9 Jan 2014 11:00:00 +0800	[thread overview]
Message-ID: <201401091059579428371@gmail.com> (raw)
In-Reply-To: 20140108213402.GG7291@kmo-pixel

>On Wed, Jan 08, 2014 at 07:39:26PM +0800, majianpeng wrote:
>> Because after kthread_create, the state of kthread is TASK_UNINTERRUPTIBLE.
>> If we don't wake up dc->writeback_thread, the thread will be hung-task.
>> For those reasons, we don't wake up writeback_thread:
>> A:only create backed device
>> B:create backed device and cache device, but don't write at once
>> C:write without writeback poliy
>> 
>> So like the way of create gc_thread, after creating writeback_thread, i
>> set the state is TASK_INTERRUPTIBLE.
>
>I've seen this issue, but this isn't even where the sleep happens,
>there's no way this could be fixing it..
Yes.But now, the default cache mode is writethrough.So kernel also printk hung-task messages.
If you don't like this way, you can use kthread_run instead kthread_create.
Because you test dc->has_dirty in bch_writeback_thread,so using kthread_run is safe.

Thanks!
Jianpeng Ma



      reply	other threads:[~2014-01-09  3:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-08 11:39 [PATCH 2/3] bcache: Avoid hung task happen majianpeng
2014-01-08 21:34 ` Kent Overstreet
2014-01-09  3:00   ` majianpeng [this message]

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=201401091059579428371@gmail.com \
    --to=majianpeng@gmail.com \
    --cc=kmo@daterainc.com \
    --cc=linux-bcache@vger.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).