[Click] Question around RouterThread

Beyers Cronje bcronje at gmail.com
Thu May 19 07:38:35 EDT 2011


Hi Eddie,


>
> I think this is a potentially interesting direction to move.  Eventually,
> though, I want this to move in a different direction, in which selected file
> descriptors, timers, and even handlers are handled by threads *the same way
> as tasks*.  That is, if StaticThreadSched(td 1) is given, then td's
> Timer/selected/etc. will be handled by thread 1.  This would simplify
> reasoning about multithreading interactions.  Currently we have, for
> example, selected() operations and timers that emit packets -- but that can
> cause problems if the timer runs on a different thread from the associated
> task.
>

That definitely sounds like the best approach long term. There will be some
challenges to implement this I suppose, thinking about elements that sit in
the path of more than one task graph. Handler processing will be challenging
from ControlSocket point of view (I haven't looked into how kernel mode
handlers operate). But overall it definitely seems like the right direction
going forward.

In the short term as a start though I'll implement something in the lines
of:

StaticThreadSched(fd 0 exclusive, td 1)

Would that be something you'll consider to merge?

Beyers


More information about the click mailing list