Re: [PATCH] block: insert a general SMP memory barrier before wake_up_bit()

2020-08-13 Thread Matthew Wilcox
On Thu, Aug 13, 2020 at 01:40:50PM +0200, pet...@infradead.org wrote: > On Thu, Aug 13, 2020 at 08:31:15AM +0100, Christoph Hellwig wrote: > > On Thu, Aug 13, 2020 at 10:44:38AM +0800, Jacob Wen wrote: > > > wake_up_bit() uses waitqueue_active() that needs the explicit smp_mb(). > > > > Sounds lik

Re: [PATCH] block: insert a general SMP memory barrier before wake_up_bit()

2020-08-13 Thread peterz
On Thu, Aug 13, 2020 at 08:31:15AM +0100, Christoph Hellwig wrote: > On Thu, Aug 13, 2020 at 10:44:38AM +0800, Jacob Wen wrote: > > wake_up_bit() uses waitqueue_active() that needs the explicit smp_mb(). > > Sounds like the barrier should go into wake_up_bit then.. Oh, thanks for reminding me..

Re: [PATCH] block: insert a general SMP memory barrier before wake_up_bit()

2020-08-13 Thread Jacob Wen
On 8/13/20 3:31 PM, Christoph Hellwig wrote: On Thu, Aug 13, 2020 at 10:44:38AM +0800, Jacob Wen wrote: wake_up_bit() uses waitqueue_active() that needs the explicit smp_mb(). Sounds like the barrier should go into wake_up_bit then.. wake_up_bit() doesn't know which one to chose: smp_mb__af

Re: [PATCH] block: insert a general SMP memory barrier before wake_up_bit()

2020-08-13 Thread Christoph Hellwig
On Thu, Aug 13, 2020 at 10:44:38AM +0800, Jacob Wen wrote: > wake_up_bit() uses waitqueue_active() that needs the explicit smp_mb(). Sounds like the barrier should go into wake_up_bit then.. > > Signed-off-by: Jacob Wen > --- > fs/block_dev.c | 1 + > 1 file changed, 1 insertion(+) > > diff -