[Olsr-dev] olsr polling/threading/mainloop/scheduler

Ferry Huberts (spam-protected)
Fri Mar 30 16:26:28 CEST 2012



On 30-03-12 16:07, Henning Rogge wrote:
> I think its "polling", but its just polling every 50 ms
> (configurable), so its not busy waiting. It should not do much to the
> power consumption.
>
> The scheduler in the new "olsr framework" can sleep arbitrary times,
> so its not polling at all anymore.
>

I don't understand what you mean.

I meant that (for sockets) we should just use the select() method on a 
socket set instead of polling the sockets.

If we use pselect then we can send a signal to ourselves to mix in the 
timers, so that we might be able to avoid threading (!)

Then we'd have _no_ polling, and everything event driven without 
threading. Now that would be sweet :-)


> Henning
>
> On Fri, Mar 30, 2012 at 17:00, Ferry Huberts<(spam-protected)>  wrote:
>> Hi guys,
>>
>> I've been looking at the scheduler in the current olsr version, stable
>> branch.
>>
>> I've seen that the mainloop uses polling of sockets and timers.
>> I can understand that this design came from the strong desire of not have
>> threading.
>>
>> However,...
>>
>> This setup is killing w.r.t power consumption, and performance too (!)
>>
>> I propose to have olsr v2 be exclusively event-driven and to use _no_
>> polling at all.
>> This (almost automatically) also means that threading will be introduced.
>>
>>
>> I can help out with the design.
>>
>>
>> Thoughts?
>>
>>
>> --
>> Ferry Huberts
>>
>>
>> --
>> Olsr-dev mailing list
>> (spam-protected)
>> https://lists.olsr.org/mailman/listinfo/olsr-dev
>
>
>

-- 
Ferry Huberts




More information about the Olsr-dev mailing list