Re: [click] userlevel multi-threads

Beyers Cronje <[email protected]> Wed, 14 Aug 2013 17:02:14 +0200
Newsgroups gmane.network.routing.click
Message-ID <CAOO3n8XoL47X1XF-YqBKSckcwgNL-no3fYMb54u4ycM9xWUogA@mail.gmail.com>
Hi Jinho,

I'm not too sure, but I dont think so.

Beyers


On Wed, Aug 14, 2013 at 4:38 PM, jinho hwang <[email protected]> wrote:

> On Wed, Aug 14, 2013 at 7:23 AM, Beyers Cronje <[email protected]> wrote:
> > You need to use either StaticThreadSched or BalancedThreadSched  to
> > schedule tasks on different threads.
> >
> > http://read.cs.ucla.edu/click/elements/staticthreadsched
> > http://read.cs.ucla.edu/click/elements/balancedthreadsched
> >
> > An example of how to use StaticThreadSched would be:
> >
> > fd0::FromDevice(eth0) -> Discard;
> > fd1::FromDevice(eth1) -> Discard;
> > StaticThreadSched(fd0 0, fd1 1);
> >
> > Beyers
> >
> >
> > On Wed, Aug 14, 2013 at 5:23 AM, jinho hwang <[email protected]>
> wrote:
> >
> >> Hi All,
> >>
> >> I am new to click. I want to use multi-threading in userlevel. I enabled
> >> and put -j 2 in command line, and am using test.click. However,
> thread_id=0
> >> always calls run_task and processes the packets, but thread_id=1
> appears in
> >> RouterThread, but then is not called at all from run_task in
> >> infinitesource. thread_id=1 even disappeared after calling twice. This
> is
> >> consistent. I could not figure out why thread_id=1 disappeared. There
> is no
> >> signal delivered to the thread (checked), it seems naturally gone.
> >>
> >> Can anybody help?
> >>
> >> Thank you,
> >>
> >> Jinho
>
> Hi Beyers,
>
> Thank you. It works like charm, and fits to my goal. One more question
> is whether it uses cpu affinity? From my analysis, there is no such
> thing. I have to fix each thread to each core. Does Click have CPU
> affinity option somewhere? Otherwise, I will add that for my purpose.
>
> Thanks,
>
> Jinho
>