Re: [PATCH] fs,xfs: fix missed wakeup on l_flush_wait

2019-05-09 Thread Rik van Riel
On Thu, 2019-05-09 at 07:32 +1000, Dave Chinner wrote: > Hmmm, the first wakeup in xsdc is this one, right: > > /* wake up threads waiting in xfs_log_force() */ > wake_up_all(>ic_force_wait); > > At the end of the iclog iteration loop? That one is under the >

Re: [PATCH] fs,xfs: fix missed wakeup on l_flush_wait

2019-05-08 Thread Dave Chinner
On Wed, May 08, 2019 at 04:39:41PM +, Chris Mason wrote: > On 7 May 2019, at 17:22, Dave Chinner wrote: > > > On Tue, May 07, 2019 at 01:05:28PM -0400, Rik van Riel wrote: > >> The code in xlog_wait uses the spinlock to make adding the task to > >> the wait queue, and setting the task state

Re: [PATCH] fs,xfs: fix missed wakeup on l_flush_wait

2019-05-08 Thread Dave Chinner
On Wed, May 08, 2019 at 10:08:59AM -0400, Rik van Riel wrote: > On Wed, 2019-05-08 at 07:22 +1000, Dave Chinner wrote: > > On Tue, May 07, 2019 at 01:05:28PM -0400, Rik van Riel wrote: > > > The code in xlog_wait uses the spinlock to make adding the task to > > > the wait queue, and setting the

Re: [PATCH] fs,xfs: fix missed wakeup on l_flush_wait

2019-05-08 Thread Chris Mason
On 7 May 2019, at 17:22, Dave Chinner wrote: > On Tue, May 07, 2019 at 01:05:28PM -0400, Rik van Riel wrote: >> The code in xlog_wait uses the spinlock to make adding the task to >> the wait queue, and setting the task state to UNINTERRUPTIBLE atomic >> with respect to the waker. >> >> Doing the

Re: [PATCH] fs,xfs: fix missed wakeup on l_flush_wait

2019-05-08 Thread Rik van Riel
On Wed, 2019-05-08 at 07:22 +1000, Dave Chinner wrote: > On Tue, May 07, 2019 at 01:05:28PM -0400, Rik van Riel wrote: > > The code in xlog_wait uses the spinlock to make adding the task to > > the wait queue, and setting the task state to UNINTERRUPTIBLE > > atomic > > with respect to the waker.

Re: [PATCH] fs,xfs: fix missed wakeup on l_flush_wait

2019-05-07 Thread Dave Chinner
On Tue, May 07, 2019 at 01:05:28PM -0400, Rik van Riel wrote: > The code in xlog_wait uses the spinlock to make adding the task to > the wait queue, and setting the task state to UNINTERRUPTIBLE atomic > with respect to the waker. > > Doing the wakeup after releasing the spinlock opens up the

[PATCH] fs,xfs: fix missed wakeup on l_flush_wait

2019-05-07 Thread Rik van Riel
The code in xlog_wait uses the spinlock to make adding the task to the wait queue, and setting the task state to UNINTERRUPTIBLE atomic with respect to the waker. Doing the wakeup after releasing the spinlock opens up the following race condition: - add task to wait queue -