Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755920AbcCBQBI (ORCPT ); Wed, 2 Mar 2016 11:01:08 -0500 Received: from mail-yk0-f169.google.com ([209.85.160.169]:33505 "EHLO mail-yk0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755070AbcCBQBB (ORCPT ); Wed, 2 Mar 2016 11:01:01 -0500 Date: Wed, 2 Mar 2016 11:00:58 -0500 From: Tejun Heo To: Peter Chen Cc: Alan Stern , florian@mickler.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, usb-storage@lists.one-eyed-alien.net, Jan Kara Subject: Re: Freezable workqueue blocks non-freezable workqueue during the system resume process Message-ID: <20160302160058.GA29826@mtj.duckdns.org> References: <20160223032056.GB12256@shlinux2.ap.freescale.net> <20160224072430.GC15452@shlinux2.ap.freescale.net> <20160225220112.GM6092@mtj.duckdns.org> <20160226061920.GA17288@shlinux2.ap.freescale.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160226061920.GA17288@shlinux2.ap.freescale.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1087 Lines: 34 Hello, (cc'ing Jan) On Fri, Feb 26, 2016 at 02:19:20PM +0800, Peter Chen wrote: > On Thu, Feb 25, 2016 at 05:01:12PM -0500, Tejun Heo wrote: > > Hello, Peter. > > > > On Wed, Feb 24, 2016 at 03:24:30PM +0800, Peter Chen wrote: > > > > You might want to complain to the block-layer people about this. I > > > > don't know if anything can be done to fix it. > > > > > > > > Or maybe flush_work and flush_delayed_work can be changed to avoid > > > > blocking if the workqueue is frozen. Tejun? > > > > > > > > > > I have a patch to show the root cause of this issue. > > > > > > http://www.spinics.net/lists/linux-usb/msg136815.html > > > > I don't get it. Why would it deadlock? Shouldn't things get rolling > > once the workqueues are thawed? > > The workqueue writeback can't be thawed due to driver's resume > (dpm_complete) is lock nested, and can't be finished. Ugh... that's nasty. I wonder whether the right thing to do is making writeback workers non-freezable. IOs are supposed to be blocked from lower layer anyway. Jan, what do you think? Thanks. -- tejun