Re: RAID1 might_sleep() warning on 3.19-rc7

2015-02-18 Thread Peter Zijlstra
On Wed, Feb 18, 2015 at 12:09:36PM +1100, NeilBrown wrote: > On Fri, 13 Feb 2015 15:48:03 +0100 Peter Zijlstra > wrote: > > > On Fri, Feb 13, 2015 at 11:27:46AM +0100, Peter Zijlstra wrote: > > > > > > I've moved blk_flush_plug to the beginning of the function. > > > > > > > I wondered if it re

Re: RAID1 might_sleep() warning on 3.19-rc7

2015-02-17 Thread NeilBrown
On Fri, 13 Feb 2015 15:48:03 +0100 Peter Zijlstra wrote: > On Fri, Feb 13, 2015 at 11:27:46AM +0100, Peter Zijlstra wrote: > > > > I've moved blk_flush_plug to the beginning of the function. > > > > > I wondered if it really make sense to call blk_flush_plug with nr_iowait > > > elevated and de

Re: RAID1 might_sleep() warning on 3.19-rc7

2015-02-13 Thread Peter Zijlstra
On Fri, Feb 13, 2015 at 11:27:46AM +0100, Peter Zijlstra wrote: > > I've moved blk_flush_plug to the beginning of the function. > > > I wondered if it really make sense to call blk_flush_plug with nr_iowait > > elevated and delayacct_blkio active. blk_flush_plug() could call schedule() > > for n

Re: RAID1 might_sleep() warning on 3.19-rc7

2015-02-13 Thread Peter Zijlstra
On Fri, Feb 13, 2015 at 07:49:53PM +1100, NeilBrown wrote: > > Like said, that will still recursive call delayacct_blkio_*() and would > > increase nr_iowait for a second time; while arguably its still the same > > one io-wait instance. > > No it doesn't. There is no "blk_flush_plug" call between

Re: RAID1 might_sleep() warning on 3.19-rc7

2015-02-13 Thread NeilBrown
On Fri, 13 Feb 2015 09:32:50 +0100 Peter Zijlstra wrote: > On Fri, Feb 13, 2015 at 04:26:00PM +1100, NeilBrown wrote: > > I choose ... Buzz Lightyear !!! > > Great choice! > > > From: NeilBrown > > Date: Fri, 13 Feb 2015 15:49:17 +1100 > > Subject: [PATCH] sched: prevent recursion in io_schedu

Re: RAID1 might_sleep() warning on 3.19-rc7

2015-02-13 Thread Peter Zijlstra
On Fri, Feb 13, 2015 at 04:26:00PM +1100, NeilBrown wrote: > I choose ... Buzz Lightyear !!! Great choice! > From: NeilBrown > Date: Fri, 13 Feb 2015 15:49:17 +1100 > Subject: [PATCH] sched: prevent recursion in io_schedule() > > io_schedule() calls blk_flush_plug() which, depending on the > co

Re: RAID1 might_sleep() warning on 3.19-rc7

2015-02-12 Thread NeilBrown
On Tue, 10 Feb 2015 10:29:36 +0100 Peter Zijlstra wrote: > On Tue, Feb 10, 2015 at 01:50:17PM +1100, NeilBrown wrote: > > On Mon, 9 Feb 2015 10:10:00 +0100 Peter Zijlstra > > wrote: > > > > However, when io_schedule() explicitly calls blk_flush_plug(), then > > > > @from_schedule=false variant

Re: RAID1 might_sleep() warning on 3.19-rc7

2015-02-10 Thread Peter Zijlstra
On Tue, Feb 10, 2015 at 10:29:36AM +0100, Peter Zijlstra wrote: > On Tue, Feb 10, 2015 at 01:50:17PM +1100, NeilBrown wrote: > > On Mon, 9 Feb 2015 10:10:00 +0100 Peter Zijlstra > > wrote: > > > > However, when io_schedule() explicitly calls blk_flush_plug(), then > > > > @from_schedule=false var

Re: RAID1 might_sleep() warning on 3.19-rc7

2015-02-10 Thread Peter Zijlstra
On Tue, Feb 10, 2015 at 01:50:17PM +1100, NeilBrown wrote: > On Mon, 9 Feb 2015 10:10:00 +0100 Peter Zijlstra wrote: > > > However, when io_schedule() explicitly calls blk_flush_plug(), then > > > @from_schedule=false variant is used, and the unplug functions are > > > allowed to > > > allocate m

Re: RAID1 might_sleep() warning on 3.19-rc7

2015-02-09 Thread NeilBrown
On Mon, 9 Feb 2015 10:10:00 +0100 Peter Zijlstra wrote: > On Mon, Feb 09, 2015 at 12:13:57PM +1100, NeilBrown wrote: > > I had to re-read the code (And your analysis) a couple of times to be sure > > ... > > Sorry :-) My point was that actually reading it (rather than assuming I knew what it s

Re: RAID1 might_sleep() warning on 3.19-rc7

2015-02-09 Thread Peter Zijlstra
On Mon, Feb 09, 2015 at 12:13:57PM +1100, NeilBrown wrote: > I had to re-read the code (And your analysis) a couple of times to be sure ... Sorry :-) > However, when io_schedule() explicitly calls blk_flush_plug(), then > @from_schedule=false variant is used, and the unplug functions are allowed

Re: RAID1 might_sleep() warning on 3.19-rc7

2015-02-08 Thread NeilBrown
On Fri, 6 Feb 2015 12:39:30 +0100 Peter Zijlstra wrote: > On Fri, Feb 06, 2015 at 08:51:33AM +1100, NeilBrown wrote: > > That is exactly what is happening here. However I don't think that is an > > "observed problem" but rather an "observed false-positive". > > > > If nothing inside the outer l

Re: RAID1 might_sleep() warning on 3.19-rc7

2015-02-06 Thread Peter Zijlstra
On Fri, Feb 06, 2015 at 08:51:33AM +1100, NeilBrown wrote: > That is exactly what is happening here. However I don't think that is an > "observed problem" but rather an "observed false-positive". > > If nothing inside the outer loop blocks, then in particular > generic_make_request will not be ca

Re: RAID1 might_sleep() warning on 3.19-rc7

2015-02-05 Thread NeilBrown
On Thu, 05 Feb 2015 15:27:58 -0500 Tony Battersby wrote: > I get the might_sleep() warning below when writing some data to an ext3 > filesystem on a RAID1. But everything works OK, so there is no actual > problem, just a warning. > > I see that there has been a fix for a might_sleep() warning i