Re: [patch V2 6/7] fs/jbd2: Make state lock a spinlock

2019-08-02 Thread Thomas Gleixner
On Fri, 2 Aug 2019, Jan Kara wrote: > On Thu 01-08-19 20:12:11, Thomas Gleixner wrote: > > On Thu, 1 Aug 2019, Jan Kara wrote: > > > On Thu 01-08-19 03:01:32, Thomas Gleixner wrote: > > > > As almost all functions which use this lock have a journal head pointer > > > > readily available, it makes

Re: [patch V2 6/7] fs/jbd2: Make state lock a spinlock

2019-08-02 Thread Jan Kara
On Thu 01-08-19 20:12:11, Thomas Gleixner wrote: > On Thu, 1 Aug 2019, Jan Kara wrote: > > On Thu 01-08-19 03:01:32, Thomas Gleixner wrote: > > > As almost all functions which use this lock have a journal head pointer > > > readily available, it makes more sense to remove the lock helper inlines >

Re: [patch V2 6/7] fs/jbd2: Make state lock a spinlock

2019-08-02 Thread Jan Kara
On Thu 01-08-19 13:28:49, Peter Zijlstra wrote: > On Thu, Aug 01, 2019 at 03:01:32AM +0200, Thomas Gleixner wrote: > > > @@ -1931,7 +1932,7 @@ static void __jbd2_journal_temp_unlink_b > > transaction_t *transaction; > > struct buffer_head *bh = jh2bh(jh); > > > > - J_ASSERT_JH(jh, jbd_

Re: [patch V2 6/7] fs/jbd2: Make state lock a spinlock

2019-08-01 Thread Thomas Gleixner
On Thu, 1 Aug 2019, Jan Kara wrote: > On Thu 01-08-19 03:01:32, Thomas Gleixner wrote: > > As almost all functions which use this lock have a journal head pointer > > readily available, it makes more sense to remove the lock helper inlines > > and write out spin_*lock() at all call sites. > > > >

Re: [patch V2 6/7] fs/jbd2: Make state lock a spinlock

2019-08-01 Thread Jan Kara
On Thu 01-08-19 03:01:32, Thomas Gleixner wrote: > Bit-spinlocks are problematic on PREEMPT_RT if functions which might sleep > on RT, e.g. spin_lock(), alloc/free(), are invoked inside the lock held > region because bit spinlocks disable preemption even on RT. > > A first attempt was to replace s

Re: [patch V2 6/7] fs/jbd2: Make state lock a spinlock

2019-08-01 Thread Peter Zijlstra
On Thu, Aug 01, 2019 at 03:01:32AM +0200, Thomas Gleixner wrote: > @@ -1931,7 +1932,7 @@ static void __jbd2_journal_temp_unlink_b > transaction_t *transaction; > struct buffer_head *bh = jh2bh(jh); > > - J_ASSERT_JH(jh, jbd_is_locked_bh_state(bh)); > + assert_spin_locked(&jh-