#3534 assigned task

Reduce uses of rtems_event_transient_send()

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

Description (last modified by Sebastian Huber)

The transient event predates the self-contained binary semaphores available now via <rtems/threads.h> and is used as workaround to avoid explicit synchronization objects. There are two issues with the transient event.

  1. It is a per-thread resources and using it for different components makes debugging/development difficult. Issues noticed in one component my be caused by another component.
  1. The diagnostic information (e.g. "task" shell command) is poor.

Replace the transient event with a binary semaphore if possible.

The performance test tmonetoone:

*** BEGIN OF TEST TMONETOONE ***
*** TEST VERSION: 6.0.0.4ac51046e0cd6d22d4c89f6d0bbea2383898d698
*** TEST STATE: EXPECTED_PASS
*** TEST BUILD: RTEMS_SMP
*** TEST TOOLS: 10.0.1 20200406 (RTEMS 6, RSB b69f54d51740810dc54a50662f5da4d4ba0ddd18, Newlib ece49e4)
yield
a 25425
b 25424
event
a 14082
b 14082
self-contained binary semaphore
a 12449
b 12449
Classic binary semaphore (FIFO)
a 12525
b 12524
Classic binary semaphore (priority)
a 11649
b 11649

*** END OF TEST TMONETOONE ***

shows that the events performing slightly better than the binary semaphores. However, the yield count is about two times the binary semaphore count.

This raises the question if we have to offer a better synchronization primitive for the request and wait for response type actions. This pattern is quite common in device drivers.

Change History (5)

comment:1 Changed on Oct 1, 2018 at 6:16:36 AM by Sebastian Huber

Owner: set to Sebastian Huber
Status: newassigned

comment:2 Changed on Oct 1, 2018 at 7:03:10 AM by Sebastian Huber <sebastian.huber@…>

In fca9132/rtems:

bsp/atsam: Use binary semaphore for SPI

Update #3534.

comment:3 Changed on Oct 1, 2018 at 7:03:25 AM by Sebastian Huber <sebastian.huber@…>

In 5cb23f4b/rtems:

bsp/atsam: Use binary semaphore for I2C

Remove superfluous sleep before each I2C transfer. Reset I2C module
after transfer timeouts.

Update #3534.

comment:4 Changed on Dec 19, 2019 at 8:07:34 AM by Sebastian Huber

Milestone: 5.16.1

comment:5 Changed on Jul 24, 2020 at 9:38:42 AM by Sebastian Huber

Description: modified (diff)
Note: See TracTickets for help on using tickets.