#4678 closed defect (fixed)

System initialization time increased compared to RTEMS 4.11

Reported by: Sebastian Huber Owned by: Sebastian Huber
Priority: normal Milestone: 6.1
Component: score Version: 5
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description (last modified by Sebastian Huber)

Since RTEMS 5, the objects based on Objects_Control are statically allocated in the .bss sections. The zero-initialization is unnecessary since each object is fully initialized after allocation by an object-specific initialization routine. The memory for objects is statically allocated or allocated from the workspace if the unlimited objects configuration option is used. Workspace memory is uninitialized by default. Optimize the static allocation to place the object controls, local tables, and thread queue heads into a .noinit section.

The longer system initialization time compared to RTEMS 4.11 may lead to hardware watchdog problems.

Change History (9)

comment:1 Changed on 07/15/22 at 06:26:19 by Sebastian Huber

Description: modified (diff)

comment:2 Changed on 07/15/22 at 08:42:56 by Sebastian Huber <sebastian.huber@…>

In 5ed00353/rtems:

bsps: Sort .noinit* sections

Sort the .noinit* input sections by name first, then by alignment if two
sections have the same name. This allows the placement of begin/end symbols to
initialize some areas with a special value.

Update #4678.

comment:3 Changed on 07/15/22 at 08:42:58 by Sebastian Huber <sebastian.huber@…>

In 4b911a75/rtems:

score: Place object controls into .noinit sections

Place the statically allocated object control blocks, local tables, and thread
queue heads into the dedicated .noinit intput sections. The output section is
not zero initialized. Placing these elements into the .noinit section reduces
the system initialization time by decreasing the .bss section size.

It may improve the cache efficiency since the mostly read local tables are
placed in a contiguous memory area.

Update #4678.

comment:4 Changed on 07/15/22 at 08:43:01 by Sebastian Huber <sebastian.huber@…>

Resolution: fixed
Status: assignedclosed

In 1bf878f7/rtems:

score: Extend memory dirty/zero actions

Dirty or zero also the part of the .noinit section used by RTEMS.

Close #4678.

comment:5 Changed on 07/18/22 at 13:45:02 by Sebastian Huber <sebastian.huber@…>

In 0e5f4c5/rtems:

spsysinit01: Account for use of .noinit section

The objects control blocks cannot be used to check the pre-initialization state
since they are allocated in a .noinit section.

Update #4678.

comment:6 Changed on 07/20/22 at 06:38:51 by Sebastian Huber <sebastian.huber@…>

In 25ccc19/rtems:

bsps/riscv: Sort .noinit* sections

Sort the .noinit* input sections by name first, then by alignment if two
sections have the same name. This allows the placement of begin/end symbols to
initialize some areas with a special value.

Update #4678.

comment:7 Changed on 07/27/22 at 06:51:59 by Sebastian Huber <sebastian.huber@…>

In 2501c64b/rtems:

score: Fix objects local table initialization

The objects local table must be statically zero-initialized so that
_Objects_Get() and _Objects_Get_no_protection() return NULL if no object is
associated with the identifier.

Update #4678.

comment:8 Changed on 07/28/22 at 06:50:25 by Sebastian Huber <sebastian.huber@…>

In 6a65803/rtems:

score: Allow linker garbage collection

Place the object control blocks in dedicated sections to allow a linker garbage
collection.

Update #4678.

comment:9 Changed on 08/01/22 at 07:07:39 by Sebastian Huber <sebastian.huber@…>

In 4d77f725/rtems:

sp54: Fix test case

Since commit 6a6580331df3e09516d50f37d4dd5fd57825c08a, the local table is
zero-initialized. Use an initial object control block instead.

Update #4678.

Note: See TracTickets for help on using tickets.