From: Jesper Dangaard Brouer > Sent: 20 May 2016 18:50 ... > If would be cool if you could run a test with removed busylock and > allow HTB to bulk dequeue.
(Without having looked ....) Could you have two queues and separate queue and dequeue locks. The enqueue code would acquire the enqueue lock and add the packet to the first queue. The dequeue code would acquire the dequeue lock and try to remove a packet from the 2nd queue, if nothing present it would acquire the enqueue lock and move the entire 1st queue to the 2nd queue. The obvious downside is two lock/unlocks for single packet dequeue. If you can guarantee a single dequeue thread the 2nd lock isn't needed. David