>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 ?韬{.n?????%??檩??w?{.n???{饼?r?{ay????j?f"??????_璁(????"??m???G??⒏??璀?x??