* [dpdk-dev] [PATCH] rte_ring: clarify preemptable nature of ring algorithm
@ 2018-05-29 5:06 Honnappa Nagarahalli
2018-05-30 2:39 ` Stephen Hemminger
0 siblings, 1 reply; 3+ messages in thread
From: Honnappa Nagarahalli @ 2018-05-29 5:06 UTC (permalink / raw)
To: olivier.matz; +Cc: dev, Honnappa Nagarahalli
rte_ring implementation is not preemptable 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>
---
lib/librte_ring/rte_ring.h | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h
index d3d3f7f..2f9c945 100644
--- a/lib/librte_ring/rte_ring.h
+++ b/lib/librte_ring/rte_ring.h
@@ -26,8 +26,13 @@
* - 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 can block threads from completing their
+ * operation under the following circumstances.
+ * A preempted thread can block other threads (operating on the same ring)
+ * from completing their operations, only if those threads are performing
+ * the same ring operation (enqueue/dequeue) as the preempted thread.
+ * In other words, a preempted consumer thread will not block any producer
+ * threads and vice versa.
*
*/
--
2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] rte_ring: clarify preemptable nature of ring algorithm
2018-05-29 5:06 [dpdk-dev] [PATCH] rte_ring: clarify preemptable nature of ring algorithm Honnappa Nagarahalli
@ 2018-05-30 2:39 ` Stephen Hemminger
2018-05-30 4:32 ` Honnappa Nagarahalli
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2018-05-30 2:39 UTC (permalink / raw)
To: Honnappa Nagarahalli; +Cc: Olivier Matz, dev
Spinlock has same problem
On Tue, May 29, 2018, 1:06 AM Honnappa Nagarahalli <
honnappa.nagarahalli@arm.com> wrote:
> rte_ring implementation is not preemptable 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>
> ---
> lib/librte_ring/rte_ring.h | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h
> index d3d3f7f..2f9c945 100644
> --- a/lib/librte_ring/rte_ring.h
> +++ b/lib/librte_ring/rte_ring.h
> @@ -26,8 +26,13 @@
> * - 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 can block threads from completing their
> + * operation under the following circumstances.
> + * A preempted thread can block other threads (operating on the same ring)
> + * from completing their operations, only if those threads are performing
> + * the same ring operation (enqueue/dequeue) as the preempted thread.
> + * In other words, a preempted consumer thread will not block any producer
> + * threads and vice versa.
> *
> */
>
> --
> 2.7.4
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] rte_ring: clarify preemptable nature of ring algorithm
2018-05-30 2:39 ` Stephen Hemminger
@ 2018-05-30 4:32 ` Honnappa Nagarahalli
0 siblings, 0 replies; 3+ messages in thread
From: Honnappa Nagarahalli @ 2018-05-30 4:32 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Olivier Matz, dev
Agree Stephen.
But rte_ring is not as basic as spinlock. IMO, existing note results in more questions than answers.
From: Stephen Hemminger <stephen@networkplumber.org>
Sent: Tuesday, May 29, 2018 9:39 PM
To: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
Cc: Olivier Matz <olivier.matz@6wind.com>; dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] rte_ring: clarify preemptable nature of ring algorithm
Spinlock has same problem
On Tue, May 29, 2018, 1:06 AM Honnappa Nagarahalli <honnappa.nagarahalli@arm.com<mailto:honnappa.nagarahalli@arm.com>> wrote:
rte_ring implementation is not preemptable 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<mailto:honnappa.nagarahalli@arm.com>>
Reviewed-by: Gavin Hu <gavin.hu@arm.com<mailto:gavin.hu@arm.com>>
Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com<mailto:ola.liljedahl@arm.com>>
---
lib/librte_ring/rte_ring.h | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h
index d3d3f7f..2f9c945 100644
--- a/lib/librte_ring/rte_ring.h
+++ b/lib/librte_ring/rte_ring.h
@@ -26,8 +26,13 @@
* - 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 can block threads from completing their
+ * operation under the following circumstances.
+ * A preempted thread can block other threads (operating on the same ring)
+ * from completing their operations, only if those threads are performing
+ * the same ring operation (enqueue/dequeue) as the preempted thread.
+ * In other words, a preempted consumer thread will not block any producer
+ * threads and vice versa.
*
*/
--
2.7.4
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-30 4:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-29 5:06 [dpdk-dev] [PATCH] rte_ring: clarify preemptable nature of ring algorithm Honnappa Nagarahalli
2018-05-30 2:39 ` Stephen Hemminger
2018-05-30 4:32 ` Honnappa Nagarahalli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).