From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753271AbcLLWa5 (ORCPT ); Mon, 12 Dec 2016 17:30:57 -0500 Received: from mail-io0-f196.google.com ([209.85.223.196]:33667 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752502AbcLLWa4 (ORCPT ); Mon, 12 Dec 2016 17:30:56 -0500 MIME-Version: 1.0 In-Reply-To: <20161212220349.GK13864@htj.duckdns.org> References: <20161209151229.GD4334@dhcp22.suse.cz> <20161212220349.GK13864@htj.duckdns.org> From: Cong Wang Date: Mon, 12 Dec 2016 14:30:34 -0800 Message-ID: Subject: Re: WARNING: CPU: 3 PID: 1568 at kernel/sched/core.c:7738 __might_sleep+0x69/0x7e To: Tejun Heo Cc: Michal Hocko , LKML , Shaohua Li Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 12, 2016 at 2:03 PM, Tejun Heo 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.