Re: [PATCH 1/4] staging: lustre: obdclass: change spinlock of key to rwlock

2018-05-03 Thread NeilBrown
On Fri, May 04 2018, Dilger, Andreas wrote: > On May 3, 2018, at 07:50, David Laight wrote: >> >> From: James Simmons >>> Sent: 02 May 2018 19:22 >>> From: Li Xi >>> >>> Most of the time, keys are never changed. So rwlock might be >>> better for the concurrency of key read. >> >> OTOH unless

Re: [PATCH 1/4] staging: lustre: obdclass: change spinlock of key to rwlock

2018-05-03 Thread Dilger, Andreas
On May 3, 2018, at 07:50, David Laight wrote: > > From: James Simmons >> Sent: 02 May 2018 19:22 >> From: Li Xi >> >> Most of the time, keys are never changed. So rwlock might be >> better for the concurrency of key read. > > OTOH unless there is contention on the spin lock during reads the >

RE: [PATCH 1/4] staging: lustre: obdclass: change spinlock of key to rwlock

2018-05-03 Thread NeilBrown
On Thu, May 03 2018, David Laight wrote: > From: James Simmons >> Sent: 02 May 2018 19:22 >> From: Li Xi >> >> Most of the time, keys are never changed. So rwlock might be >> better for the concurrency of key read. > > OTOH unless there is contention on the spin lock during reads the > additiona

RE: [PATCH 1/4] staging: lustre: obdclass: change spinlock of key to rwlock

2018-05-03 Thread David Laight
From: James Simmons > Sent: 02 May 2018 19:22 > From: Li Xi > > Most of the time, keys are never changed. So rwlock might be > better for the concurrency of key read. OTOH unless there is contention on the spin lock during reads the additional cost of a rwlock (probably double that of a spinlock

[PATCH 1/4] staging: lustre: obdclass: change spinlock of key to rwlock

2018-05-02 Thread James Simmons
From: Li Xi Most of the time, keys are never changed. So rwlock might be better for the concurrency of key read. Signed-off-by: Li Xi Signed-off-by: Gu Zheng Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6800 Reviewed-on: http://review.whamcloud.com/15558 Reviewed-by: Faccini Bruno Revi