linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: Tejun Heo <tj@kernel.org>
Cc: Michal Hocko <mhocko@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>, Shaohua Li <shli@fb.com>
Subject: Re: WARNING: CPU: 3 PID: 1568 at kernel/sched/core.c:7738 __might_sleep+0x69/0x7e
Date: Mon, 12 Dec 2016 14:30:34 -0800	[thread overview]
Message-ID: <CAM_iQpUhKuVoYkhwDPhCCNPr1_xYqnX2qBDamH0zwTUibqOv2Q@mail.gmail.com> (raw)
In-Reply-To: <20161212220349.GK13864@htj.duckdns.org>

On Mon, Dec 12, 2016 at 2:03 PM, Tejun Heo <tj@kernel.org> wrote:
> Hello, Michal.
>
> On Fri, Dec 09, 2016 at 04:12:29PM +0100, Michal Hocko wrote:
>> At first I thought this would be related to you recent work
>> http://lkml.kernel.org/r/1477673892-28940-1-git-send-email-tj@kernel.org
>> but that doesn't seem to be in the linux-next I am using as a base.
>> io_schedule_timeout is on the stack though so you might have an idea
>> what is going on here. That might_sleep check has been added a long ago
>> 02e7cf8f8488 ("ide-cd,atapi: use bio for internal commands") in 2.6.31
>> so I am wondering what has changed since than.
>
> 10d784eae2b4 ("sched: always use blk_schedule_flush_plug in
> io_schedule_out") seems related.  might_sleep is complaining that it's
> being called while !TASK_RUNNING.  Shaohua, any ideas?

Yeah, it is pretty much similar to the one I fixed for networking:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d9dc8b0f8b4ec8cdc48ad5a20a3105387138be82

But in your case, it is complicated because of the wait bits API.

  reply	other threads:[~2016-12-12 22:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-09 15:12 WARNING: CPU: 3 PID: 1568 at kernel/sched/core.c:7738 __might_sleep+0x69/0x7e Michal Hocko
2016-12-12 22:03 ` Tejun Heo
2016-12-12 22:30   ` Cong Wang [this message]
2016-12-12 22:45   ` Shaohua Li
2016-12-21 10:47     ` Michal Hocko
2016-12-21 19:24       ` Cong Wang
2016-12-21 20:57         ` Michal Hocko

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=CAM_iQpUhKuVoYkhwDPhCCNPr1_xYqnX2qBDamH0zwTUibqOv2Q@mail.gmail.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@kernel.org \
    --cc=shli@fb.com \
    --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).