lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 14 Apr 2016 14:48:07 -0400 From: Waiman Long <waiman.long@....com> To: Jan Kara <jack@...e.cz> CC: Alexander Viro <viro@...iv.linux.org.uk>, Jan Kara <jack@...e.com>, Jeff Layton <jlayton@...chiereds.net>, "J. Bruce Fields" <bfields@...ldses.org>, Tejun Heo <tj@...nel.org>, Christoph Lameter <cl@...ux-foundation.org>, <linux-fsdevel@...r.kernel.org>, <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...hat.com>, Peter Zijlstra <peterz@...radead.org>, Andi Kleen <andi@...stfloor.org>, Dave Chinner <dchinner@...hat.com>, Boqun Feng <boqun.feng@...il.com>, Scott J Norton <scott.norton@....com>, Douglas Hatch <doug.hatch@....com> Subject: Re: [PATCH v7 1/4] lib/percpu-list: Per-cpu list with associated per-cpu locks On 04/14/2016 10:10 AM, Jan Kara wrote: > On Tue 12-04-16 18:54:43, Waiman Long wrote: >> 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 per-cpu list subystem with associated >> per-cpu locks for protecting each of the lists individually. This >> allows list entries insertion and deletion operations to happen in >> parallel instead of being serialized with a global list and lock. >> >> List entry insertion is strictly per cpu. List deletion, however, can >> happen in a cpu other than the one that did the insertion. So we still >> need lock to protect the list. Because of that, there may still be >> a small amount of contention when deletion is being done. >> >> A new header file include/linux/percpu-list.h will be added with the >> associated pcpu_list_head and pcpu_list_node structures. The following >> functions are provided to manage the per-cpu list: >> >> 1. int init_pcpu_list_head(struct pcpu_list_head **ppcpu_head) >> 2. void pcpu_list_add(struct pcpu_list_node *node, >> struct pcpu_list_head *head) >> 3. void pcpu_list_del(struct pcpu_list *node) >> >> Iteration of all the list entries within a group of per-cpu >> lists is done by calling either the pcpu_list_iterate() or >> pcpu_list_iterate_safe() functions in a while loop. They correspond >> to the list_for_each_entry() and list_for_each_entry_safe() macros >> respectively. The iteration states are keep in a pcpu_list_state >> structure that is passed to the iteration functions. >> >> Signed-off-by: Waiman Long<Waiman.Long@....com> > The patch looks good to me now. So you can add: > > Reviewed-by: Jan Kara<jack@...e.cz> > > Honza Thanks for the review. Cheers, Longman
Powered by blists - more mailing lists