This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: FreeBSD-stack ping is unresponsive upon low priority thread spending 100% CPU


Øyvind Harboe wrote:
> On Thu, Oct 9, 2008 at 2:30 PM, Gary Thomas <gary@mlbassoc.com> wrote:
>> Øyvind Harboe wrote:
>>> I've got a thread running at low priority
>>> that is spending 100% of available CPU. The application is a
>>> telnet command line.
>>>
>>> While this low priority threads is using 100% CPU, then ping
>>> is unresponsive. No packets are lost though.... when the low
>>> priority yields the CPU again, all ping packets are returned.
>>>
>>> However, when no connections are currently open(no
>>> telnet session in progress), ping works fine even if the
>>> same low priority thread spends 100% of the CPU...
>>>
>>> I would have said that preemptive multithreading was
>>> disabled somehow(scheduler lock count problems), except
>>> that I would have expected the idle thread never to yield
>>> the CPU to another thread then...
>>>
>>> Below shows my app (pthread.00000800) running at
>>> priority 15, i.e. lower than all other threads except idle
>>> thread.
>>>
>>>> threads
>>> {{Idle Thread} RUN 1 31 31}
>>> {{Network alarm support} RUN 2 6 6}
>>> {{Network support} SLEEP 3 7 7}
>>> {pthread.00000800 RUN 4 15 6}
>>> {{DHCP lease mgt} SLEEP 5 8 8}
>>> {{TFTP server} SLEEP 6 10 10}
>>> {{HTTPD Thread} SLEEP 7 16 16}
>>> {{uart thread} SLEEP 8 1 1}
>> Which of these fields is the thread priority?
> 
> second one(as you guess).
> 
>> It _kindof_ looks like your 'uart' thread has a priority
>> higher than any of the Network threads, which could explain
>> a lot.
> 
> It's sleeping + it the active telnet session doesn't
> 
> 
>> Can you duplicate this [errant] behaviour in a [stand-alone] test?
> 
> I'll try my best, it sure is the only thing I can think of now. If I can't
> then that proves that there is something fishy somewhere in my app,
> which is half way to a solution...
> 
> While I'm at it I might as well try to add it to eCos?
> 
> What package does it belong in?
> 

I'd think along with the other general network tests (net/common)


-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]