DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2] rte_ring: clarify preemptible nature of ring algorithm
@ 2018-05-29  5:28 Honnappa Nagarahalli
  2018-05-29  9:09 ` Burakov, Anatoly
  0 siblings, 1 reply; 7+ messages in thread
From: Honnappa Nagarahalli @ 2018-05-29  5:28 UTC (permalink / raw)
  To: olivier.matz; +Cc: dev, Honnappa Nagarahalli

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>
---
v2:
* Fixed checkpatch warnings

 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] 7+ messages in thread

* Re: [dpdk-dev] [PATCH v2] rte_ring: clarify preemptible nature of ring algorithm
  2018-05-29  5:28 [dpdk-dev] [PATCH v2] rte_ring: clarify preemptible nature of ring algorithm Honnappa Nagarahalli
@ 2018-05-29  9:09 ` Burakov, Anatoly
  2018-05-29 16:36   ` Honnappa Nagarahalli
  0 siblings, 1 reply; 7+ messages in thread
From: Burakov, Anatoly @ 2018-05-29  9:09 UTC (permalink / raw)
  To: Honnappa Nagarahalli, olivier.matz; +Cc: dev

On 29-May-18 6:28 AM, Honnappa Nagarahalli wrote:
> 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>
> ---
> v2:
> * Fixed checkpatch warnings
> 
>   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.
>    *
>    */
>   
> 

Similar clarification is already present in Programmer's Guide for 
rte_ring section. Perhaps it would be good to reference it here?

-- 
Thanks,
Anatoly

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH v2] rte_ring: clarify preemptible nature of ring algorithm
  2018-05-29  9:09 ` Burakov, Anatoly
@ 2018-05-29 16:36   ` Honnappa Nagarahalli
  2018-05-30  7:47     ` Burakov, Anatoly
  0 siblings, 1 reply; 7+ messages in thread
From: Honnappa Nagarahalli @ 2018-05-29 16:36 UTC (permalink / raw)
  To: Burakov, Anatoly, olivier.matz; +Cc: dev

I do not see the documentation regarding this in programmer's guide.

-----Original Message-----
From: Burakov, Anatoly <anatoly.burakov@intel.com>
Sent: Tuesday, May 29, 2018 4:10 AM
To: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>; olivier.matz@6wind.com
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] rte_ring: clarify preemptible nature of ring algorithm

On 29-May-18 6:28 AM, Honnappa Nagarahalli wrote:
> 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>
> ---
> v2:
> * Fixed checkpatch warnings
>
>   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.
>    *
>    */
>
>

Similar clarification is already present in Programmer's Guide for rte_ring section. Perhaps it would be good to reference it here?

--
Thanks,
Anatoly
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] 7+ messages in thread

* Re: [dpdk-dev] [PATCH v2] rte_ring: clarify preemptible nature of ring algorithm
  2018-05-29 16:36   ` Honnappa Nagarahalli
@ 2018-05-30  7:47     ` Burakov, Anatoly
  2018-05-31  4:53       ` Honnappa Nagarahalli
  0 siblings, 1 reply; 7+ messages in thread
From: Burakov, Anatoly @ 2018-05-30  7:47 UTC (permalink / raw)
  To: Honnappa Nagarahalli, olivier.matz; +Cc: dev

On 29-May-18 5:36 PM, Honnappa Nagarahalli wrote:
> I do not see the documentation regarding this in programmer's guide.

Hi

Apologies, it's not in rte_ring section, it's in programmer's guide for EAL:

http://www.dpdk.org/doc/guides/prog_guide/env_abstraction_layer.html#known-issues

Perhaps this could be referenced in the rte_ring (or indeed copied/moved 
there)?

-- 
Thanks,
Anatoly

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH v2] rte_ring: clarify preemptible nature of ring algorithm
  2018-05-30  7:47     ` Burakov, Anatoly
@ 2018-05-31  4:53       ` Honnappa Nagarahalli
  2018-06-25 15:37         ` Olivier Matz
  0 siblings, 1 reply; 7+ messages in thread
From: Honnappa Nagarahalli @ 2018-05-31  4:53 UTC (permalink / raw)
  To: Burakov, Anatoly, olivier.matz; +Cc: dev

No problem, it is still in programmer's guide :). I will rework the patch.
Thank you,
Honnappa

-----Original Message-----
From: Burakov, Anatoly <anatoly.burakov@intel.com>
Sent: Wednesday, May 30, 2018 2:48 AM
To: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>; olivier.matz@6wind.com
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] rte_ring: clarify preemptible nature of ring algorithm

On 29-May-18 5:36 PM, Honnappa Nagarahalli wrote:
> I do not see the documentation regarding this in programmer's guide.

Hi

Apologies, it's not in rte_ring section, it's in programmer's guide for EAL:

http://www.dpdk.org/doc/guides/prog_guide/env_abstraction_layer.html#known-issues

Perhaps this could be referenced in the rte_ring (or indeed copied/moved there)?

--
Thanks,
Anatoly
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] 7+ messages in thread

* Re: [dpdk-dev] [PATCH v2] rte_ring: clarify preemptible nature of ring algorithm
  2018-05-31  4:53       ` Honnappa Nagarahalli
@ 2018-06-25 15:37         ` Olivier Matz
  2018-07-10  0:16           ` Honnappa Nagarahalli
  0 siblings, 1 reply; 7+ messages in thread
From: Olivier Matz @ 2018-06-25 15:37 UTC (permalink / raw)
  To: Honnappa Nagarahalli; +Cc: Burakov, Anatoly, dev

Hi Honnappa,

On Thu, May 31, 2018 at 04:53:01AM +0000, Honnappa Nagarahalli wrote:
> > -----Original Message-----
> > From: Burakov, Anatoly <anatoly.burakov@intel.com>
> > Sent: Wednesday, May 30, 2018 2:48 AM
> > To: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>; olivier.matz@6wind.com
> > Cc: dev@dpdk.org
> > Subject: Re: [dpdk-dev] [PATCH v2] rte_ring: clarify preemptible nature of ring algorithm
> > 
> > On 29-May-18 5:36 PM, Honnappa Nagarahalli wrote:
> > > I do not see the documentation regarding this in programmer's guide.
> > 
> > Hi
> > 
> > Apologies, it's not in rte_ring section, it's in programmer's guide for EAL:
> > 
> > http://www.dpdk.org/doc/guides/prog_guide/env_abstraction_layer.html#known-issues
> > 
> > Perhaps this could be referenced in the rte_ring (or indeed copied/moved there)?
>
> No problem, it is still in programmer's guide :). I will rework the patch.
> Thank you,
> Honnappa

Thank you for your patch proposal. Do you still plan to submit a new version?

I think the description from
http://www.dpdk.org/doc/guides/prog_guide/env_abstraction_layer.html#known-issues
should be moved in rte_ring.h header.

Thanks,
Olivier

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH v2] rte_ring: clarify preemptible nature of ring algorithm
  2018-06-25 15:37         ` Olivier Matz
@ 2018-07-10  0:16           ` Honnappa Nagarahalli
  0 siblings, 0 replies; 7+ messages in thread
From: Honnappa Nagarahalli @ 2018-07-10  0:16 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Burakov, Anatoly, dev, nd



-----Original Message-----
From: Olivier Matz <olivier.matz@6wind.com> 
Sent: Monday, June 25, 2018 10:37 AM
To: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
Cc: Burakov, Anatoly <anatoly.burakov@intel.com>; dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] rte_ring: clarify preemptible nature of ring algorithm

Hi Honnappa,

On Thu, May 31, 2018 at 04:53:01AM +0000, Honnappa Nagarahalli wrote:
> > -----Original Message-----
> > From: Burakov, Anatoly <anatoly.burakov@intel.com>
> > Sent: Wednesday, May 30, 2018 2:48 AM
> > To: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>; olivier.matz@6wind.com
> > Cc: dev@dpdk.org
> > Subject: Re: [dpdk-dev] [PATCH v2] rte_ring: clarify preemptible nature of ring algorithm
> > 
> > On 29-May-18 5:36 PM, Honnappa Nagarahalli wrote:
> > > I do not see the documentation regarding this in programmer's guide.
> > 
> > Hi
> > 
> > Apologies, it's not in rte_ring section, it's in programmer's guide for EAL:
> > 
> > http://www.dpdk.org/doc/guides/prog_guide/env_abstraction_layer.html#known-issues
> > 
> > Perhaps this could be referenced in the rte_ring (or indeed copied/moved there)?
>
> No problem, it is still in programmer's guide :). I will rework the patch.
> Thank you,
> Honnappa

Thank you for your patch proposal. Do you still plan to submit a new version?

I think the description from
http://www.dpdk.org/doc/guides/prog_guide/env_abstraction_layer.html#known-issues
should be moved in rte_ring.h header.

Apologies for the late reply, have been on vacation.

I have a patch ready, it took time undergoing internal review, will send it out soon.

Thanks,
Olivier

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-07-10  0:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-29  5:28 [dpdk-dev] [PATCH v2] rte_ring: clarify preemptible nature of ring algorithm Honnappa Nagarahalli
2018-05-29  9:09 ` Burakov, Anatoly
2018-05-29 16:36   ` Honnappa Nagarahalli
2018-05-30  7:47     ` Burakov, Anatoly
2018-05-31  4:53       ` Honnappa Nagarahalli
2018-06-25 15:37         ` Olivier Matz
2018-07-10  0:16           ` 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).