netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RFC:  Removing busy-spin in pktgen.
@ 2006-10-24  0:02 Ben Greear
  2006-10-24  9:16 ` Robert Olsson
  0 siblings, 1 reply; 6+ messages in thread
From: Ben Greear @ 2006-10-24  0:02 UTC (permalink / raw)
  To: NetDev; +Cc: Robert Olsson

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

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RFC:  Removing busy-spin in pktgen.
  2006-10-24  0:02 RFC: Removing busy-spin in pktgen Ben Greear
@ 2006-10-24  9:16 ` Robert Olsson
  2006-10-24 10:14   ` David Miller
  2006-10-24 16:28   ` Ben Greear
  0 siblings, 2 replies; 6+ messages in thread
From: Robert Olsson @ 2006-10-24  9:16 UTC (permalink / raw)
  To: Ben Greear; +Cc: NetDev, Robert Olsson


Ben Greear writes:
 > 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?

 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RFC: Removing busy-spin in pktgen.
  2006-10-24  9:16 ` Robert Olsson
@ 2006-10-24 10:14   ` David Miller
  2006-10-24 16:34     ` Ben Greear
  2006-10-24 16:28   ` Ben Greear
  1 sibling, 1 reply; 6+ messages in thread
From: David Miller @ 2006-10-24 10:14 UTC (permalink / raw)
  To: Robert.Olsson; +Cc: greearb, netdev

From: Robert Olsson <Robert.Olsson@data.slu.se>
Date: Tue, 24 Oct 2006 11:16:05 +0200

>  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?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RFC:  Removing busy-spin in pktgen.
  2006-10-24  9:16 ` Robert Olsson
  2006-10-24 10:14   ` David Miller
@ 2006-10-24 16:28   ` Ben Greear
  1 sibling, 0 replies; 6+ messages in thread
From: Ben Greear @ 2006-10-24 16:28 UTC (permalink / raw)
  To: Robert Olsson; +Cc: NetDev

Robert Olsson wrote:
> Ben Greear writes:
>  > 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?
>
>  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.
>   
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

>  
>  Cheers.
> 					--ro
>   


-- 
Ben Greear <greearb@candelatech.com> 
Candela Technologies Inc  http://www.candelatech.com



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RFC: Removing busy-spin in pktgen.
  2006-10-24 10:14   ` David Miller
@ 2006-10-24 16:34     ` Ben Greear
  2006-10-24 22:09       ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Ben Greear @ 2006-10-24 16:34 UTC (permalink / raw)
  To: David Miller; +Cc: Robert.Olsson, netdev

David Miller wrote:
> From: Robert Olsson <Robert.Olsson@data.slu.se>
> Date: Tue, 24 Oct 2006 11:16:05 +0200
>
>   
>>  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

> -
> 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
>   


-- 
Ben Greear <greearb@candelatech.com> 
Candela Technologies Inc  http://www.candelatech.com



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RFC: Removing busy-spin in pktgen.
  2006-10-24 16:34     ` Ben Greear
@ 2006-10-24 22:09       ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2006-10-24 22:09 UTC (permalink / raw)
  To: greearb; +Cc: Robert.Olsson, netdev

From: Ben Greear <greearb@candelatech.com>
Date: Tue, 24 Oct 2006 09:34:38 -0700

> 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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-10-24 22:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-24  0:02 RFC: Removing busy-spin in pktgen Ben Greear
2006-10-24  9:16 ` Robert Olsson
2006-10-24 10:14   ` David Miller
2006-10-24 16:34     ` Ben Greear
2006-10-24 22:09       ` David Miller
2006-10-24 16:28   ` Ben Greear

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).