RFC: Removing busy-spin in pktgen.
Subsystems (2)
I'm planning to re-merge my long-lost pktgen branch with the kernel tree's pktgen.
I believe the main difference is that my out-of-tree pktgen does not do the busy-spin, but waits on a queue for the net-device to wake it's tx-queue when over-driving a NIC.
To implement this, I added a hook in the netdev-wake-queue logic and let pktgen register itself as interested....
Is there any interest in adding this sort of feature to the official pktgen?
Thanks,
Ben
Signature · 2 lines
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com
Quoted 7 lines · Ben Greear
I'm planning to re-merge my long-lost pktgen branch with the kernel tree's pktgen.
I believe the main difference is that my out-of-tree pktgen does not do the busy-spin, but waits on a queue for the net-device to wake it's tx-queue when over-driving a NIC.
Quoted 5 lines
To implement this, I added a hook in the netdev-wake-queue logic and let pktgen register itself as interested....
Is there any interest in adding this sort of feature to the official pktgen?
Hello!
So question is, pktgen hooks in netif_wake_queue or let pktgen busy-spin?
My first instinct is to avoid the hook in general code and pktgen let spin to only affect testing.
Cheers.
--ro
David Miller
maintainerFrom: Robert Olsson <[email protected]>
Date: Tue, 24 Oct 2006 11:16:05 +0200
Quoted 2 lines
My first instinct is to avoid the hook in general code and pktgen let spin to only affect testing.
Mine too.
Why make everyone in the world make that check in netif_wake_queue(), or wherever, when %99.99999999999 of the time it'll never be used?
Quoted 4 lines · David Miller
From: Robert Olsson <[email protected]>
Date: Tue, 24 Oct 2006 11:16:05 +0200
Quoted 9 lines
Quoted 3 lines
My first instinct is to avoid the hook in general code and pktgen let spin to only affect testing.
Mine too.
Why make everyone in the world make that check in
netif_wake_queue(), or wherever, when %99.99999999999 of the time it'll never be used?
It could be a compile-time option, and even if compiled in, it should only be an if branch on a pointer. Is there any noticeable performance hit for an if check if you wrap it with unlikely?
Thanks,
Ben
Quoted 5 lines
-
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 1 line
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com
David Miller
maintainerFrom: Ben Greear <[email protected]>
Date: Tue, 24 Oct 2006 09:34:38 -0700
Quoted 4 lines
It could be a compile-time option, and even if compiled in, it should only be an if branch on
a pointer. Is there any noticeable performance hit for an if check if you wrap it with unlikely?
It's "just an if test", yes, but it is such a test dependant upon a memory access, and that pointer has to live somewhere and that takes up space and conflicts with other members in the cpu cache line.
Hooks of this nature are never free or cheap.
Quoted 14 lines · Robert Olsson
Quoted 7 lines · Ben Greear
I'm planning to re-merge my long-lost pktgen branch with the kernel tree's pktgen.
I believe the main difference is that my out-of-tree pktgen does not do the busy-spin, but waits on a queue for the net-device to wake it's tx-queue when over-driving a NIC.
Quoted 5 lines
To implement this, I added a hook in the netdev-wake-queue logic and let pktgen register itself as interested....
Is there any interest in adding this sort of feature to the official pktgen?
Quoted 7 lines
Hello!
So question is, pktgen hooks in
netif_wake_queueor let pktgen busy-spin?My first instinct is to avoid the hook in general code and pktgen let spin to only affect testing.
Ok. For my testing, I often run pktgen at slower speeds and need to run other applications with good performance as well, so it hurts to give pktgen an entire CPU to just spin. I'm going to go ahead and port over the no-spin logic and hooks, but I'll try to keep that patch easily separated from the rest of the changes I make to pktgen so perhaps the other changes can be incorporated.
Thanks,
Ben
Quoted 4 lines
Cheers.
--ro
Signature · 1 line
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com