libBSD and CPU Load display questions in SMP mode

jameszxj jameszxj at gmail.com
Tue Oct 16 08:28:38 UTC 2018


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


#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)
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20181016/65d29d04/attachment.html>


More information about the devel mailing list