Re: [PATCH v7 1/6] lib/dlock-list: Distributed and lock-protected lists

2017-10-18 Thread Boqun Feng
On Thu, Oct 05, 2017 at 06:43:23PM +, Waiman Long wrote: [...] > +/* > + * Find the first entry of the next available list. > + */ > +extern struct dlock_list_node * > +__dlock_list_next_list(struct dlock_list_iter *iter); > + > +/** > + * __dlock_list_next_entry - Iterate to the next entry of

Re: [PATCH v7 1/6] lib/dlock-list: Distributed and lock-protected lists

2017-10-18 Thread Boqun Feng
On Thu, Oct 05, 2017 at 06:43:23PM +, Waiman Long wrote: [...] > +/* > + * Find the first entry of the next available list. > + */ > +extern struct dlock_list_node * > +__dlock_list_next_list(struct dlock_list_iter *iter); > + > +/** > + * __dlock_list_next_entry - Iterate to the next entry of

Re: [PATCH v7 1/6] lib/dlock-list: Distributed and lock-protected lists

2017-10-13 Thread Waiman Long
On 10/10/2017 01:35 AM, Boqun Feng wrote: > On Thu, Oct 05, 2017 at 06:43:23PM +, Waiman Long wrote: > [...] >> +/* >> + * As all the locks in the dlock list are dynamically allocated, they need >> + * to belong to their own special lock class to avoid warning and stack >> + * trace in kernel

Re: [PATCH v7 1/6] lib/dlock-list: Distributed and lock-protected lists

2017-10-13 Thread Waiman Long
On 10/10/2017 01:35 AM, Boqun Feng wrote: > On Thu, Oct 05, 2017 at 06:43:23PM +, Waiman Long wrote: > [...] >> +/* >> + * As all the locks in the dlock list are dynamically allocated, they need >> + * to belong to their own special lock class to avoid warning and stack >> + * trace in kernel

Re: [PATCH v7 1/6] lib/dlock-list: Distributed and lock-protected lists

2017-10-09 Thread Boqun Feng
On Thu, Oct 05, 2017 at 06:43:23PM +, Waiman Long wrote: [...] > +/* > + * As all the locks in the dlock list are dynamically allocated, they need > + * to belong to their own special lock class to avoid warning and stack > + * trace in kernel log when lockdep is enabled. Statically allocated

Re: [PATCH v7 1/6] lib/dlock-list: Distributed and lock-protected lists

2017-10-09 Thread Boqun Feng
On Thu, Oct 05, 2017 at 06:43:23PM +, Waiman Long wrote: [...] > +/* > + * As all the locks in the dlock list are dynamically allocated, they need > + * to belong to their own special lock class to avoid warning and stack > + * trace in kernel log when lockdep is enabled. Statically allocated

[PATCH v7 1/6] lib/dlock-list: Distributed and lock-protected lists

2017-10-05 Thread Waiman Long
Linked list is used everywhere in the Linux kernel. However, if many threads are trying to add or delete entries into the same linked list, it can create a performance bottleneck. This patch introduces a new list APIs that provide a set of distributed lists (one per CPU), each of which is

[PATCH v7 1/6] lib/dlock-list: Distributed and lock-protected lists

2017-10-05 Thread Waiman Long
Linked list is used everywhere in the Linux kernel. However, if many threads are trying to add or delete entries into the same linked list, it can create a performance bottleneck. This patch introduces a new list APIs that provide a set of distributed lists (one per CPU), each of which is