From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f67.google.com (mail-pl0-f67.google.com [209.85.160.67]) by dpdk.org (Postfix) with ESMTP id F02F32E41 for ; Wed, 30 May 2018 04:39:19 +0200 (CEST) Received: by mail-pl0-f67.google.com with SMTP id v24-v6so10118997plo.3 for ; Tue, 29 May 2018 19:39:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YmoCW/p5untFsVb7GNZithI5dou+q0dLzBUNxjF0pPs=; b=Y2+NmL+Nxyto/GTW2R9JsDPTW/AdEoS2WXt/gF6r4+pvlLiPmOWj3+wHfLYx2CnIJc m5UCkfmTTQjspU6QhJybSN1gig4K7QMBhCOi+wJpUMvbzv81VcMDmXvfmjk2nP5lxjMl 5JQ2smVI1Qeoq7BEZH8oIvXUJ4bTg47t3NdWqgQBC+4BDbU1FsfFTM55HwUhbEfOk7Yy +6rweutnoPsrG2HNxJJ5HPyELTAy47LcAFatug4chujXj/NPcDzfC82+E/HwJNH+wsf1 hB4iey6w/fhFd6K65QI8JgIozQgkT4MUgH80QkCP3ApZ8TUL9frdIHdVgvdadVr4W56M mKDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YmoCW/p5untFsVb7GNZithI5dou+q0dLzBUNxjF0pPs=; b=dBxmBKLZ0uRP/KPzVJxRpizp1cK6332AAax9y1JUa0GsAnXLszXu/ru1hvmmQ+otNh zzU58o8wPiwrkj9YvZ4STM85Yvv4D45y6Anp/L0vJFFi7cTXx0xHKwxUa1uZstclq6so 1UPejiCjws2hxeC+3RztuFtI3jevJfo9E5E/EXl76XjXCfByX5BOok4RPYRhpuWTlsoV 6XDdXj4z1eCKiSKgW6enBIDeoepWjI+zo5SONwZU3Z1JpoOI4+EyecCvUbjLlf1GrkuB YwcrQXwd9FzZMnGBvKixpOkuQy514H7gYrDBU0JXrSrPYHXuJriQPz/QPSBzX+NSTJrY S1rA== X-Gm-Message-State: ALKqPwdvQoVl8fURfUVCYG/9dehTgfmjPOzPYKNWAHKLanumRcsYlqUc kJoakmOO4o8Wzfp8b8QdC300E3ycpLxEtPh67Nn+TA== X-Google-Smtp-Source: ADUXVKIikmF0+O71FITU3648OGSoU8bgtdKFue+wDFhPCxfNg9LRuMMMRI806yFdGFTgQoJNamrdi+lOufzyNjabvto= X-Received: by 2002:a17:902:b7c4:: with SMTP id v4-v6mr989161plz.188.1527647958970; Tue, 29 May 2018 19:39:18 -0700 (PDT) MIME-Version: 1.0 References: <1527570373-120745-1-git-send-email-honnappa.nagarahalli@arm.com> In-Reply-To: <1527570373-120745-1-git-send-email-honnappa.nagarahalli@arm.com> From: Stephen Hemminger Date: Tue, 29 May 2018 22:39:06 -0400 Message-ID: To: Honnappa Nagarahalli Cc: Olivier Matz , dev@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] rte_ring: clarify preemptable nature of ring algorithm X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 May 2018 02:39:20 -0000 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 > Reviewed-by: Gavin Hu > Reviewed-by: Ola Liljedahl > --- > 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 > >