Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751326AbXAQX16 (ORCPT ); Wed, 17 Jan 2007 18:27:58 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751363AbXAQX16 (ORCPT ); Wed, 17 Jan 2007 18:27:58 -0500 Received: from ns.virtualhost.dk ([195.184.98.160]:26950 "EHLO virtualhost.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751326AbXAQX15 (ORCPT ); Wed, 17 Jan 2007 18:27:57 -0500 Date: Thu, 18 Jan 2007 10:18:47 +1100 From: Jens Axboe To: Dave Kleikamp Cc: JFS Discussion , fsdevel , linux-kernel , Nick Piggin Subject: Re: [PATCH: 2.6.20-rc4-mm1] JFS: Avoid deadlock introduced by explicit I/O plugging Message-ID: <20070117231847.GH3508@kernel.dk> References: <1169074549.10560.10.camel@kleikamp.austin.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1169074549.10560.10.camel@kleikamp.austin.ibm.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1466 Lines: 33 On Wed, Jan 17 2007, Dave Kleikamp wrote: > Jens, > Can you please take a look at this patch, and if you think it's sane, > add it to your explicit i/o plugging patchset? Would it make sense in > any of these paths to use io_schedule() instead of schedule()? I'm glad you bring that up, actually. One of the "downsides" of the new unplugging is that it really requires anyone waiting for IO in a path like the file system or device driver to use io_schedule() instead of schedule() to get the blk_replug_current_nested() done to avoid deadlocks. While it is annoying that it could introduce some deadlocks until we get things fixed it, I do consider it a correctness fix even in the generic kernel, as you are really waiting for IO and as such should use io_schedule() in the first place. Perhaps I should add a WARN_ON() check for this to catch these bugs upfront. > I hadn't looked at your patchset until I discovered that jfs was easy to > hang in the -mm kernel. I think jfs may be able to add explicit > plugging and unplugging in a couple of places, but I'd like to fix the > hang right away and take my time with any later patches. Can you try io_schedule() and verify that things just work? -- Jens Axboe - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/