Messages in this thread | | | Date | Thu, 18 Jan 2007 10:18:47 +1100 | From | Jens Axboe <> | Subject | Re: [PATCH: 2.6.20-rc4-mm1] JFS: Avoid deadlock introduced by explicit I/O plugging |
| |
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/
| |