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

2016-07-14 Thread Tejun Heo
Hello, On Thu, Jul 14, 2016 at 01:13:24PM -0400, Waiman Long wrote: > On 07/14/2016 07:50 AM, Tejun Heo wrote: > I got comment related to the percpu-list name from Christoph Lameter a while > ago. His argument was that since deletion can happenned from any CPU, it was > not really percpu like the

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

2016-07-14 Thread Tejun Heo
Hello, On Thu, Jul 14, 2016 at 01:13:24PM -0400, Waiman Long wrote: > On 07/14/2016 07:50 AM, Tejun Heo wrote: > I got comment related to the percpu-list name from Christoph Lameter a while > ago. His argument was that since deletion can happenned from any CPU, it was > not really percpu like the

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

2016-07-14 Thread Waiman Long
On 07/14/2016 07:50 AM, Tejun Heo wrote: Hello, On Wed, Jul 13, 2016 at 10:54:19PM -0400, Waiman Long wrote: On 07/13/2016 12:08 PM, Tejun Heo wrote: On Mon, Jul 11, 2016 at 01:32:06PM -0400, Waiman Long wrote: ... A new header file include/linux/dlock-list.h will be added with the Heh, I

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

2016-07-14 Thread Waiman Long
On 07/14/2016 07:50 AM, Tejun Heo wrote: Hello, On Wed, Jul 13, 2016 at 10:54:19PM -0400, Waiman Long wrote: On 07/13/2016 12:08 PM, Tejun Heo wrote: On Mon, Jul 11, 2016 at 01:32:06PM -0400, Waiman Long wrote: ... A new header file include/linux/dlock-list.h will be added with the Heh, I

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

2016-07-14 Thread Waiman Long
On 07/14/2016 10:51 AM, Tejun Heo wrote: Hello, Jan. On Thu, Jul 14, 2016 at 04:35:47PM +0200, Jan Kara wrote: The current use case only need to use the regular lock functions. You are right that future use cases may require an irqsafe version of locks. I can either modify the code now to

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

2016-07-14 Thread Waiman Long
On 07/14/2016 10:51 AM, Tejun Heo wrote: Hello, Jan. On Thu, Jul 14, 2016 at 04:35:47PM +0200, Jan Kara wrote: The current use case only need to use the regular lock functions. You are right that future use cases may require an irqsafe version of locks. I can either modify the code now to

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

2016-07-14 Thread Tejun Heo
Hello, Jan. On Thu, Jul 14, 2016 at 04:35:47PM +0200, Jan Kara wrote: > > > The current use case only need to use the regular lock functions. You are > > > right that future use cases may require an irqsafe version of locks. I can > > > either modify the code now to allow lock type selection at

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

2016-07-14 Thread Tejun Heo
Hello, Jan. On Thu, Jul 14, 2016 at 04:35:47PM +0200, Jan Kara wrote: > > > The current use case only need to use the regular lock functions. You are > > > right that future use cases may require an irqsafe version of locks. I can > > > either modify the code now to allow lock type selection at

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

2016-07-14 Thread Jan Kara
On Thu 14-07-16 07:50:43, Tejun Heo wrote: > > > > +void dlock_list_add(struct dlock_list_node *node, struct > > > > dlock_list_head *head) > > > > +{ > > > > + struct dlock_list_head *myhead; > > > > + > > > > + /* > > > > +* Disable preemption to make sure that CPU won't

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

2016-07-14 Thread Jan Kara
On Thu 14-07-16 07:50:43, Tejun Heo wrote: > > > > +void dlock_list_add(struct dlock_list_node *node, struct > > > > dlock_list_head *head) > > > > +{ > > > > + struct dlock_list_head *myhead; > > > > + > > > > + /* > > > > +* Disable preemption to make sure that CPU won't

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

2016-07-14 Thread Tejun Heo
Hello, On Wed, Jul 13, 2016 at 10:54:19PM -0400, Waiman Long wrote: > On 07/13/2016 12:08 PM, Tejun Heo wrote: > > On Mon, Jul 11, 2016 at 01:32:06PM -0400, Waiman Long wrote: > > ... > > > A new header file include/linux/dlock-list.h will be added with the > > Heh, I think perpcu_list was the

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

2016-07-14 Thread Tejun Heo
Hello, On Wed, Jul 13, 2016 at 10:54:19PM -0400, Waiman Long wrote: > On 07/13/2016 12:08 PM, Tejun Heo wrote: > > On Mon, Jul 11, 2016 at 01:32:06PM -0400, Waiman Long wrote: > > ... > > > A new header file include/linux/dlock-list.h will be added with the > > Heh, I think perpcu_list was the

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

2016-07-13 Thread Waiman Long
On 07/13/2016 12:08 PM, Tejun Heo wrote: Hello, On Mon, Jul 11, 2016 at 01:32:06PM -0400, Waiman Long wrote: ... A new header file include/linux/dlock-list.h will be added with the Heh, I think perpcu_list was the better name but suppose I'm too late. Given the fact that we may change the

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

2016-07-13 Thread Waiman Long
On 07/13/2016 12:08 PM, Tejun Heo wrote: Hello, On Mon, Jul 11, 2016 at 01:32:06PM -0400, Waiman Long wrote: ... A new header file include/linux/dlock-list.h will be added with the Heh, I think perpcu_list was the better name but suppose I'm too late. Given the fact that we may change the

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

2016-07-13 Thread Tejun Heo
Hello, On Mon, Jul 11, 2016 at 01:32:06PM -0400, Waiman Long wrote: ... > A new header file include/linux/dlock-list.h will be added with the Heh, I think perpcu_list was the better name but suppose I'm too late. > associated dlock_list_head and dlock_list_node structures. The following >

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

2016-07-13 Thread Tejun Heo
Hello, On Mon, Jul 11, 2016 at 01:32:06PM -0400, Waiman Long wrote: ... > A new header file include/linux/dlock-list.h will be added with the Heh, I think perpcu_list was the better name but suppose I'm too late. > associated dlock_list_head and dlock_list_node structures. The following >

[PATCH v2 1/7] lib/dlock-list: Distributed and lock-protected lists

2016-07-11 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 v2 1/7] lib/dlock-list: Distributed and lock-protected lists

2016-07-11 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