[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070510.135707.10298706.davem@davemloft.net>
Date: Thu, 10 May 2007 13:57:07 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: gaagaan@...il.com
Cc: sri@...ibm.com, rick.jones2@...com, krkumar2@...ibm.com,
johnpol@....mipt.ru, netdev@...r.kernel.org
Subject: Re: [RFC] New driver API to speed up small packets xmits
From: Gagan Arneja <gaagaan@...il.com>
Date: Thu, 10 May 2007 13:40:22 -0700
> David Miller wrote:
> >
> > If the qdisc is packed with packets and we would just loop sending
> > them to the device, yes it might make sense.
> >
> > But if that isn't the case, which frankly is the usual case, you add a
> > non-trivial amount of latency by batching and that's bad exactly for
> > the kind of applications that send small frames.
> >
>
> I don't understand how transmitting already batched up packets in one go
> introduce latency.
Keep thinking :-)
The only case where these ideas can be seriously considered is during
netif_wake_queue(). In all other cases we go straight to the device
from sendmsg(), since there is space in the TX ring, and we should
not try to batch as that will add latency.
So maybe find a solution in that area, some new driver interface that
can suck N packets out of a qdisc when netif_wake_queue() occurs.
If you look at the contexts in which netif_wake_queue() is called,
it's perfect, it already has the TX state of the driver locked, it has
the TX descriptor head/tail pointers handy, etc. and it's already
taken all the cache misses needed in order to work with this state.
-
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