Thu Jun 17 10:58:05 CEST 2010
On Don, 2010-06-17 at 08:07 +0200, Henning Rogge wrote:
> On Wed June 16 2010 19:39:55 Airton Ishimori wrote:
> > void add_olsr_socket (int fd, socket_handler_func pf_pr,
> > socket_handler_func pf_imm, void *data, unsigned int flags);
> Yes, I agree... this function could be done better (putting it onto the 0.7.0
> TODO list).
> If you have a good suggestion how to clean up the interface, just reply to
> this mail. ;)
- move all the polling sockets over to immediate sockets (because I
suspect that none of them actually need the 1/20 second latency)
- kill the polling socket part
at least that was on my ToDo-list ages ago - just never got to it - so
the above was more a intermediate step.
> > In above prototype function in olsrd-0.6 , what means the parameters? and
> > what difference between pf_pr and pf_imm? It's obrigatory put all
> > parameters in the call function?
Historically: one of the functions can be NULL. The function errored out
if both are NULL as it makes no sense to call it.
> There are two different kind of socket handlers in the scheduler of OLSRd. One
> type is the "polling sockets" and one is the "immediate socket".
> Polling sockets will only accumulate their traffic until the OLSRd polling
> interval triggers to conserve cpu and energy. All handling of OLSRd messages
> is done in polling sockets (typically 20 times per second).
The polling sockets (with a (default) 1/20 second sleep() in the main
loop) were the only ones when I saw/touched olsrd first (that were 0.4
times IIRC). That lead to a fixed latency for all packets (which wasn't
really noticably) but in burst cases we actually lost packets. This was
also due to malloc()/free() trashing, a quite CPU-intense (not really
scaling) Dijkstra-algorithm and other CPU waste when the Viennese net
was ~250 nodes or so (Aaron knows probably more accurate numbers).
Some - if not most - of that has been mostly fixed ages ago.
Bernd Petrovitsch Email : (spam-protected)
LUGA : http://www.luga.at
More information about the Olsr-dev