Re: [PATCH 1/1] network memory allocator.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 15, 2006 at 10:08:23AM +0200, Andi Kleen ([email protected]) wrote:
> Andrew Morton <[email protected]> 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.

I had a version with per-cpu data - it is not very convenient to use here with it's 
per_cpu_ptr dereferencings....

> -Andi

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux