[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1308009777.31900.87.camel@vi2.jf.intel.com>
Date: Mon, 13 Jun 2011 17:02:57 -0700
From: Vasu Dev <vasu.dev@...ux.intel.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@...el.com>, davem@...emloft.net,
Vasu Dev <vasu.dev@...el.com>, netdev@...r.kernel.org,
gospo@...hat.com
Subject: Re: [net-next 13/13] ixgbe: use per NUMA node lock for FCoE DDP
On Sat, 2011-06-11 at 07:18 +0200, Eric Dumazet wrote:
> > +static void ixgbe_fcoe_lock_init(struct ixgbe_fcoe *fcoe)
> > +{
> > + int node;
> > + spinlock_t *node_lock;
> > +
> > + fcoe->node_lock = kzalloc(sizeof(node_lock) *
> num_possible_nodes(),
> > + GFP_KERNEL);
>
> Hmm...
>
> 1) Think of what happens if some machine has 3 possible nodes : 0, 2,
> 3
>
> -> You should use nr_node_ids instead of num_possible_nodes()
>
Just curious won't these both return same values ? Anycase use of
nr_nodes_ids looks better as it is already set.
> 2) Make sure this block cant have false sharing : Allocate at least a
> full cache line : On a typical 2 node machine, you currently allocate
> 16bytes of memory, and this small block could share a contended cache
> line.
Yeap good point. Thanks
>
>
> > + if (!fcoe->node_lock)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists