libBSD and CPU Load display questions in SMP mode

jameszxj jameszxj at gmail.com
Wed Oct 17 02:17:03 UTC 2018


thanks, 
1.I read the c-use doc, but still confused about EDF SCHEDULER.
The doc said "All SMP schedulers included in RTEMS are priority based. "
Is that mean High priority task always piror low priority task just like Priority SMP Scheduler.
But some doc from internet said EDF scheduler has a dynamic priority.


My system wants High priority task always piror low priority task, low priority task can be delay or interrupt.
Does it means that we can not use EDF scheduler?


2.I create a patch about top usage to make the display messages look reasonable, if someone have time to review it?
I notice that the top usage display 2 priority,RPRI and CPRI, they are the same value , what's the diffrence?


On 16/10/2018 10:28, jameszxj wrote:
> Hi,
>    ask questions again,(◡‿◡)
>
> Board infomation:
> ----------------------------------------------------------------------------------------
> CPU:zynq z7020  RTEMS version: master version
> SMP define:
> #define CONFIGURE_MAXIMUM_PROCESSORS        2
>
> #if 1
> #define CONFIGURE_MAXIMUM_PRIORITY 255
>
> #define CONFIGURE_SCHEDULER_PRIORITY_SMP

The only SMP scheduler supported by libbsd is:

#define CONFIGURE_SCHEDULER_EDF_SMP

>
> #include <rtems/scheduler.h>
> RTEMS_SCHEDULER_PRIORITY_SMP(a, CONFIGURE_MAXIMUM_PRIORITY + 1);
> RTEMS_SCHEDULER_PRIORITY_SMP(b, CONFIGURE_MAXIMUM_PRIORITY + 1);
> #define SCHED_A rtems_build_name(' ', ' ', ' ', 'A')
> #define SCHED_B rtems_build_name(' ', ' ', ' ', 'B')
> #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
> RTEMS_SCHEDULER_TABLE_PRIORITY_SMP(a, SCHED_A), \
> RTEMS_SCHEDULER_TABLE_PRIORITY_SMP(b, SCHED_B)
>
> #define CONFIGURE_SCHEDULER_ASSIGNMENTS \
>   RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY), \
>   RTEMS_SCHEDULER_ASSIGN(1, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL)
> #endif
> ----------------------------------------------------------------------------------------
>    I am switching from AMP mode to SMP mode, and found 2 problems.
> 1. top command display message, Load is 100%, and Idle is almost 100% too.
> Is it right? In fact,CPU is doing nothing.
>
> Tasks:   25  Load Average:  100.510%  Load:  100.966% Idle:   99.033%
> Mem:  457M free  50M used 516K stack
>
>  ID         | NAME                | RPRI | CPRI   | TIME             | 
> TOTAL   | CURRENT
> ------------+---------------------+---------------+---------------------+---------+--^^----
>  0x09010002 | IDLE                |  510 |  510   | 4m9.328460        
>   |  50.073 | 100.000
>  0x09010001 | IDLE                |  510 |  510   | 4m7.319959        
>   |  49.670 |  99.033
>  0x0a010002 | WDOG                |    6 |    6   | 0.003674          
>   |   0.000 |   0.001
>
> 2.when I connect to RTEMS with ftp or telnet, system reset.
> If just only define CONFIGURE_MAXIMUM_PROCESSORS,ftp and telnet is ok.
>
> *** FATAL ***
> fatal source: 10 (RTEMS_FATAL_SOURCE_SMP)
> fatal code: 7 (0x00000007)

This is:

SMP_FATAL_SCHEDULER_PIN_OR_UNPIN_NOT_SUPPORTED

> RTEMS version: 5.0.0
> RTEMS tools: 7.3.0 20180125 (RTEMS 5, RSB 
> d2d46786f113ed39d29deafa3feeb4d42ae94001, Newlib 
> d13c84eb07e35984bf7a974cd786a6cdac29e6b9)
> executing thread ID: 0x08a010006
> executing thread name: IRQS

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20181017/3cc5de0c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cpuusagetop.patch
Type: application/octet-stream
Size: 1801 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/devel/attachments/20181017/3cc5de0c/attachment.obj>


More information about the devel mailing list