libBSD and CPU Load display questions in SMP mode

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Oct 16 08:34:08 UTC 2018


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.




More information about the devel mailing list