Re: [net-next PATCH V5] qdisc: bulk dequeue support for qdiscs with TCQ_F_ONETXQUEUE
From: Jesper Dangaard Brouer <hidden>
Date: 2014-10-01 17:29:03
On Wed, 01 Oct 2014 11:34:55 -0400 Jamal Hadi Salim [off-list ref] wrote:
The issue is: if i am going to attempt to do a bulk transfer every single time (with new code) and for the common use case the result is "no need to do bulking" then you just added extra code that is unnecessary for that common case. Even a single extra if statement at high packet rate is still costly and would be easy to observe.
[...]
That is if the added code ends up being hit meaningfully. Jesper said (and it was my experience as well) that it was _hard_ to achieve bulking in such a case.
Let me close this one... The bulk dequeue code *is* being hit meaningfully. It is _only_ going to be activated when (q->qlen > 0) see __dev_xmit_skb() in dev.c. When there is no queue pfifo_fast is allowed to directly call sch_direct_xmit() without a enqueue/dequeue cycle. Thus, this code would not be hit for every packet. Thus, code is activated only when q->qlen is >= 1. And I have already shown that we see a win with just bulking 2 packets: "Subject: qdisc/UDP_STREAM: measuring effect of qdisc bulk dequeue" http://thread.gmane.org/gmane.linux.network/331152/focus=331154 I actually believe, that I have already measured and shown that going though the bulk dequeue is a win, this should show direct_xmit vs. bulking: "Subject: qdisc/trafgen: Measuring effect of qdisc bulk dequeue, with trafgen" http://thread.gmane.org/gmane.linux.network/331152 -- Best regards, Jesper Dangaard Brouer MSc.CS, Sr. Network Kernel Developer at Red Hat Author of http://www.iptv-analyzer.org LinkedIn: http://www.linkedin.com/in/brouer