[RTEMS Project] #3534: Reduce uses of rtems_event_transient_send()

RTEMS trac trac at rtems.org
Fri Jul 24 09:38:42 UTC 2020


#3534: Reduce uses of rtems_event_transient_send()
-----------------------------+------------------------------
 Reporter:  Sebastian Huber  |       Owner:  Sebastian Huber
     Type:  task             |      Status:  assigned
 Priority:  normal           |   Milestone:  6.1
Component:  dev              |     Version:  5
 Severity:  normal           |  Resolution:
 Keywords:                   |  Blocked By:
 Blocking:                   |
-----------------------------+------------------------------
Description changed by Sebastian Huber:

Old description:

> 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.
>
> 2. The diagnostic information (e.g. "task" shell command) is poor.
>
> Replace the transient event with a binary semaphore if possible.

New description:

 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.

 2. 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.

--

--
Ticket URL: <http://devel.rtems.org/ticket/3534#comment:5>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list