lkml.org 
[lkml]   [2006]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/1] network memory allocator.
From
Date
Andrew Morton <akpm@osdl.org> writes:
>
> There will be heaps of cacheline pingpong accessing these arrays. I'd have
> though that
>
> static struct whatever {
> avl_t avl_node_id;
> struct avl_node **avl_node_array;
> struct list_head *avl_container_array;
> struct avl_node *avl_root;
> struct avl_free_list *avl_free_list_head;
> spinlock_t avl_free_lock;
> } __cacheline_aligned_in_smp whatevers[NR_CPUS];
>
> would be better.

Or even better per cpu data. New global/static NR_CPUS arrays should be really discouraged.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-08-15 10:11    [W:0.196 / U:1.192 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site