Re: [PATCH 1/2] locking/mutex: Don't hog RCU read lock while optimistically spinning

2020-09-13 Thread Sultan Alsawaf
On Mon, Sep 07, 2020 at 05:20:31PM +0100, Will Deacon wrote: > On Fri, Aug 07, 2020 at 12:16:35PM -0700, Sultan Alsawaf wrote: > > From: Sultan Alsawaf > > > > There's no reason to hold an RCU read lock the entire time while > > optimistically spinning for a mutex lock. This can needlessly

Re: [PATCH 1/2] locking/mutex: Don't hog RCU read lock while optimistically spinning

2020-09-07 Thread Will Deacon
On Fri, Aug 07, 2020 at 12:16:35PM -0700, Sultan Alsawaf wrote: > From: Sultan Alsawaf > > There's no reason to hold an RCU read lock the entire time while > optimistically spinning for a mutex lock. This can needlessly lengthen > RCU grace periods and slow down synchronize_rcu() when it doesn't

[PATCH 1/2] locking/mutex: Don't hog RCU read lock while optimistically spinning

2020-08-07 Thread Sultan Alsawaf
From: Sultan Alsawaf There's no reason to hold an RCU read lock the entire time while optimistically spinning for a mutex lock. This can needlessly lengthen RCU grace periods and slow down synchronize_rcu() when it doesn't brute force the RCU grace period via rcupdate.rcu_expedited=1.