This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: FreeBSD-stack ping is unresponsive upon low priority thread spending 100% CPU
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Øyvind Harboe <oyvind dot harboe at zylin dot com>
- Cc: eCos Disuss <ecos-discuss at ecos dot sourceware dot org>
- Date: Thu, 09 Oct 2008 06:30:45 -0600
- Subject: Re: [ECOS] FreeBSD-stack ping is unresponsive upon low priority thread spending 100% CPU
- References: <c09652430810090520p5bc0b179t387c73ae09299145@mail.gmail.com>
Ø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?
It _kindof_ looks like your 'uart' thread has a priority
higher than any of the Network threads, which could explain
a lot.
Can you duplicate this [errant] behaviour in a [stand-alone] test?
--
------------------------------------------------------------
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