Re: Preventing ng_callout() timeouts to trigger packet queuing

2014-04-16 Thread Karim Fodil-Lemelin
Hi Julian, The code behaves as you described. The intent is clearly there and I can confirm the behavior is correct for incoming packets. At this point it looks like turning off net.isr.direct makes a difference too so I'm trying to understand the relationship between the system's queuing

Re: Preventing ng_callout() timeouts to trigger packet queuing

2014-04-11 Thread Julian Elischer
disclaimer: I'm not looking at the code now.. I want to go to bed: :-) When I wrote that code, the idea was that even a direct node execution should become a queuing operation if there was already something else on the queue. so in that model packets were not supposed to get re-ordered.

Re: Preventing ng_callout() timeouts to trigger packet queuing

2014-04-11 Thread Adrian Chadd
Well, ethernet drivers nowdays seem to be doing: * always queue * then pop the head item off the queue and transmit that. -a On 11 April 2014 11:59, Julian Elischer jul...@freebsd.org wrote: disclaimer: I'm not looking at the code now.. I want to go to bed: :-) When I wrote that code, the

Re: Preventing ng_callout() timeouts to trigger packet queuing

2014-04-10 Thread Karim Fodil-Lemelin
Hi, By the way this change has opened the gates to greater performance for us when using ng_callout() inside nodes. In some cases we see twice as much pps since packets are direct dispatched instead of being queued in software interrupts threads (swi*). Thanks, Karim PS: I did file a PR :

Re: Preventing ng_callout() timeouts to trigger packet queuing

2014-04-10 Thread Adrian Chadd
Sweet! I'll ask around and see if anyone netmap clued can review. :) -a On 10 April 2014 08:18, Karim Fodil-Lemelin fodillemlinka...@gmail.com wrote: Hi, By the way this change has opened the gates to greater performance for us when using ng_callout() inside nodes. In some cases we see

Preventing ng_callout() timeouts to trigger packet queuing

2014-04-09 Thread Karim Fodil-Lemelin
Hi List, I'm calling out to the general wisdom ... I have seen an issue in netgraph where, if called, a callout routine registered by ng_callout() will trigger packet queuing inside the worklist of netgraph since ng_callout() makes my node suddenly a WRITER node (therefore non reentrant) for

Re: Preventing ng_callout() timeouts to trigger packet queuing

2014-04-09 Thread Karim Fodil-Lemelin
Hi, Below is a revised patch for this issue. It accounts for nodes or hooks that explicitly need to be queuing: @@ -3632,7 +3632,12 @@ ng_callout(struct callout *c, node_p node, hook_p hook, int ticks, if ((item = ng_alloc_item(NGQF_FN, NG_NOFLAGS)) == NULL) return

Re: Preventing ng_callout() timeouts to trigger packet queuing

2014-04-09 Thread Adrian Chadd
Hi! Would you mind filing a PR for this? www.freebsd.org/send-pr.html That way it won't (hopefully!) get lost. Thanks! -a On 9 April 2014 14:25, Karim Fodil-Lemelin fodillemlinka...@gmail.com wrote: Hi, Below is a revised patch for this issue. It accounts for nodes or hooks that