On Thu, Mar 01, 2012 at 01:10:19PM +0000, James Bottomley wrote:
> On Thu, 2012-03-01 at 06:47 -0500, Neil Horman wrote:
> > On Wed, Feb 29, 2012 at 03:28:44PM -0800, Vasu Dev wrote:
> > > On Mon, 2012-02-27 at 14:22 -0500, Neil Horman wrote:
> > > > There is potentially lots of contention for the rx_list_lock.  On a cpu 
> > > > that is
> > > > receiving lots of fcoe traffic, the softirq context has to add and 
> > > > release the
> > > > lock for every frame it receives, as does the receiving per-cpu thread. 
> > > >  We can
> > > > reduce this contention somewhat by altering the per-cpu threads loop 
> > > > such that
> > > > when traffic is detected on the fcoe_rx_list, we splice it to a 
> > > > temporary list.
> > > > In this way, we can process multiple skbs while only having to acquire 
> > > > and
> > > > release the fcoe_rx_list lock once.
> > > > 
> > > > Signed-off-by: Neil Horman <nhor...@tuxdriver.com>
> > > > CC: Robert Love <robert.w.l...@intel.com>
> > > > CC: Vasu Dev <vasu....@linux.intel.com>
> > > > CC: "James E.J. Bottomley" <jbottom...@parallels.com>
> > > > ---
> > > >  drivers/scsi/fcoe/fcoe.c |   24 ++++++++++++++++--------
> > > >  1 files changed, 16 insertions(+), 8 deletions(-)
> > > > 
> > > > diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
> > > > index dc5597b..45e43d8 100644
> > > > --- a/drivers/scsi/fcoe/fcoe.c
> > > > +++ b/drivers/scsi/fcoe/fcoe.c
> > > > @@ -1463,7 +1463,7 @@ static int fcoe_rcv(struct sk_buff *skb, struct 
> > > > net_device *netdev,
> > > >          * in softirq context.
> > > >          */
> > > >         __skb_queue_tail(&fps->fcoe_rx_list, skb);
> > > > -       if (fps->fcoe_rx_list.qlen == 1)
> > > > +       if (fps->thread->state == TASK_INTERRUPTIBLE)
> > > >                 wake_up_process(fps->thread);
> > > >         spin_unlock(&fps->fcoe_rx_list.lock);
> > > >  
> > > > @@ -1782,23 +1782,31 @@ static int fcoe_percpu_receive_thread(void *arg)
> > > >  {
> > > >         struct fcoe_percpu_s *p = arg;
> > > >         struct sk_buff *skb;
> > > > +       struct sk_buff_head tmp;
> > > > +
> > > > +       skb_queue_head_init(&tmp);
> > > >  
> > > >         set_user_nice(current, -20);
> > > >  
> > > > +get_more_skbs:
> > > 
> > > This label is not used and would throw compiler warning, rest all looks
> > > good.
> > > 
> > > Vasu
> > > 
> > Crud, you're right, I'll repost this shortly.  Thanks!
> 
> Just so you all know.  If you want me to take it into the scsi tree, it
> has to go to the SCSI list.  If you keep it on the open-fcoe list,
> that's fine, but Robert or someone will have to take it into their tree
> and repost to linux-scsi.  Whichever way works for you is fine.
> 
> James
> 
Thank you for the note James, I had expected, given that this was all fcoe code,
that it would go into the foce tree.  I CC'ed you as get_maintainer.pl suggested
I do so, and I figured better to be complete.
Thanks!
Neil

_______________________________________________
devel mailing list
devel@open-fcoe.org
https://lists.open-fcoe.org/mailman/listinfo/devel

Reply via email to