RE: [RFC PATCH] sched: only dequeue if packet can be queued to hardware queue.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jarek Poplawski <jarkao2@...>
Cc: netdev@vger.kernel.org <netdev@...>, herbert@gondor.apana.org.au <herbert@...>, davem@davemloft.net <davem@...>, kaber@trash.net <kaber@...>
Date: Friday, September 19, 2008 - 12:26 pm

Jarek Poplawski wrote:

Actually most of that is handled in the fact that netif_tx_wake_queue
will call __netif_schedule when it decides to wake up a queue that has
been stopped.  Putting it in skb_dequeue is unnecessary, and the way
you did it would cause issues because you should be scheduling the root
qdisc, not the one currently doing the dequeue.

My bigger concern is the fact one queue is back to stopping all queues.
By using one global XOFF state, you create head-of-line blocking.  I can
see the merit in this approach but the problem is for multiqueue the
queues really should be independent.  What your change does is reduce the
benefit of having multiqueue by throwing in a new state which pretty much
matches what netif_stop/wake_queue used to do in the 2.6.26 version of tx
multiqueue.

Also changing dequeue_skb will likely cause additional issues for
several qdiscs as it doesn't report anything up to parent queues, as a
result you will end up with qdiscs like prio acting more like multiq
because they won't know if a queue is empty, stopped, or throttled.
Also I believe this will cause a panic on pfifo_fast and several other
qdiscs because some check to see if there are packets in the queue and
if so dequeue with the assumption that they will get a packet out.  You
will need to add checks for this to resolve this issue.

The one thing I liked about my approach was that after I was done you
could have prio as a parent of multiq leaves or multiq as the parent of
prio leaves and all the hardware queues would receive the packets in the
same order as the result.

Thanks,

Alex
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
RE: [RFC PATCH] sched: only dequeue if packet can be queued ..., Duyck, Alexander H, (Fri Sep 19, 12:26 pm)
RE: [RFC PATCH] sched: only dequeue if packet can be queued ..., Duyck, Alexander H, (Fri Sep 19, 2:01 pm)
RE: [RFC PATCH] sched: only dequeue if packet can be queued ..., Duyck, Alexander H, (Fri Sep 19, 5:43 pm)
[PATCH take2] pkt_sched: Fix TX state checking in qdisc_run(), Jarek Poplawski, (Fri Sep 19, 10:44 am)
[PATCH] pkt_sched: Fix TX state checking in qdisc_run(), Jarek Poplawski, (Fri Sep 19, 9:07 am)