ring: clarify preemptible nature of algorithm
rte_ring implementation is not preemptible only under certain circumstances. This clarification is helpful for data plane and control plane communication using rte_ring. Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Reviewed-by: Gavin Hu <gavin.hu@arm.com> Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
This commit is contained in:
parent
b2a4654f08
commit
4a6e683c4c
@ -449,13 +449,17 @@ Known Issues
|
||||
Bypassing this constraint may cause the 2nd pthread to spin until the 1st one is scheduled again.
|
||||
Moreover, if the 1st pthread is preempted by a context that has an higher priority, it may even cause a dead lock.
|
||||
|
||||
This does not mean it cannot be used, simply, there is a need to narrow down the situation when it is used by multi-pthread on the same core.
|
||||
This means, use cases involving preemptible pthreads should consider using rte_ring carefully.
|
||||
|
||||
1. It CAN be used for any single-producer or single-consumer situation.
|
||||
1. It CAN be used for preemptible single-producer and single-consumer use case.
|
||||
|
||||
2. It MAY be used by multi-producer/consumer pthread whose scheduling policy are all SCHED_OTHER(cfs). User SHOULD be aware of the performance penalty before using it.
|
||||
2. It CAN be used for non-preemptible multi-producer and preemptible single-consumer use case.
|
||||
|
||||
3. It MUST not be used by multi-producer/consumer pthreads, whose scheduling policies are SCHED_FIFO or SCHED_RR.
|
||||
3. It CAN be used for preemptible single-producer and non-preemptible multi-consumer use case.
|
||||
|
||||
4. It MAY be used by preemptible multi-producer and/or preemptible multi-consumer pthreads whose scheduling policy are all SCHED_OTHER(cfs), SCHED_IDLE or SCHED_BATCH. User SHOULD be aware of the performance penalty before using it.
|
||||
|
||||
5. It MUST not be used by multi-producer/consumer pthreads, whose scheduling policies are SCHED_FIFO or SCHED_RR.
|
||||
|
||||
+ rte_timer
|
||||
|
||||
|
@ -26,8 +26,9 @@
|
||||
* - Bulk dequeue.
|
||||
* - Bulk enqueue.
|
||||
*
|
||||
* Note: the ring implementation is not preemptable. A lcore must not
|
||||
* be interrupted by another task that uses the same ring.
|
||||
* Note: the ring implementation is not preemptible. Refer to Programmer's
|
||||
* guide/Environment Abstraction Layer/Multiple pthread/Known Issues/rte_ring
|
||||
* for more information.
|
||||
*
|
||||
*/
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user