Re: [PATCH v9 5/5] lib/dlock-list: Scale dlock_lists_empty()

2018-10-16 Thread Davidlohr Bueso
On Thu, 04 Oct 2018, Waiman Long wrote: On 10/04/2018 03:16 AM, Jan Kara wrote: On Wed 12-09-18 15:28:52, Waiman Long wrote: From: Davidlohr Bueso Instead of the current O(N) implementation, at the cost of adding an atomic counter, we can convert the call to an atomic_read(). The counter onl

Re: [PATCH v9 5/5] lib/dlock-list: Scale dlock_lists_empty()

2018-10-04 Thread Waiman Long
On 10/04/2018 03:16 AM, Jan Kara wrote: > On Wed 12-09-18 15:28:52, Waiman Long wrote: >> From: Davidlohr Bueso >> >> Instead of the current O(N) implementation, at the cost >> of adding an atomic counter, we can convert the call to >> an atomic_read(). The counter only serves for accounting >> em

Re: [PATCH v9 5/5] lib/dlock-list: Scale dlock_lists_empty()

2018-10-04 Thread Jan Kara
On Wed 12-09-18 15:28:52, Waiman Long wrote: > From: Davidlohr Bueso > > Instead of the current O(N) implementation, at the cost > of adding an atomic counter, we can convert the call to > an atomic_read(). The counter only serves for accounting > empty to non-empty transitions, and vice versa; t

[PATCH v9 5/5] lib/dlock-list: Scale dlock_lists_empty()

2018-09-12 Thread Waiman Long
From: Davidlohr Bueso Instead of the current O(N) implementation, at the cost of adding an atomic counter, we can convert the call to an atomic_read(). The counter only serves for accounting empty to non-empty transitions, and vice versa; therefore only modified twice for each of the lists during