From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by dpdk.org (Postfix) with ESMTP id 182C35A97 for ; Thu, 12 Feb 2015 12:16:09 +0100 (CET) Received: by mail-wi0-f178.google.com with SMTP id em10so3387281wid.5 for ; Thu, 12 Feb 2015 03:16:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=JjaJQMMtzFpCSL0EEtWzxaLIJrvFycYlSKUfQwpGdfI=; b=WSdFN416nWEgNznNoVU2GPSdhJOpDc196/phRsaxAXo17KTU4Y1Wr7EbTaRNOva7eK l5ZT0mgcVCa4zjiZccE3U4HpQT+3mQ9KcyLAKaurUpkWPhtnP24vR0kRKtJAm6ZOAi4U 4VUdRLjrcYl3i71gAh2H6LEPc+iPuOFTQ+u+SwD9ot9ifTiNF0Xvir1Pzf5BorZfe0a/ F+SWps+QrqrzqttHKrQAnkWxXRlmfW6zts523t1FDYhs4eSKmmskSpqYtotv5+rw+qD/ ld7a8zP/WU028O8g9QVgGuRhGH7YEvtd7CT86ZX1ULp6LcdEupUfr3mTkWRrgJ389Zn/ 3uSQ== X-Gm-Message-State: ALoCoQm9VLW4u/TbEAnTABMJ8n090j3lDgbb23y3TK+ZFDYiPIbcCR4kqWdz9QZjVbfZLzYB9bHz X-Received: by 10.181.11.170 with SMTP id ej10mr5144035wid.46.1423739768936; Thu, 12 Feb 2015 03:16:08 -0800 (PST) Received: from [10.16.0.195] (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id ax10sm5234608wjc.26.2015.02.12.03.16.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Feb 2015 03:16:08 -0800 (PST) Message-ID: <54DC8B78.2040009@6wind.com> Date: Thu, 12 Feb 2015 12:16:08 +0100 From: Olivier MATZ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.2.0 MIME-Version: 1.0 To: Cunming Liang , dev@dpdk.org References: <1422842559-13617-1-git-send-email-cunming.liang@intel.com> <1423728996-3004-1-git-send-email-cunming.liang@intel.com> <1423728996-3004-19-git-send-email-cunming.liang@intel.com> In-Reply-To: <1423728996-3004-19-git-send-email-cunming.liang@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v5 18/19] ring: add sched_yield to avoid spin forever X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 11:16:09 -0000 Hi, On 02/12/2015 09:16 AM, Cunming Liang wrote: > Add a sched_yield() syscall if the thread spins for too long, waiting other thread to finish its operations on the ring. > That gives pre-empted thread a chance to proceed and finish with ring enqnue/dequeue operation. > The purpose is to reduce contention on the ring. By ring_perf_test, it doesn't shows additional perf penalty. > > Signed-off-by: Cunming Liang > --- > v5 changes: > add RTE_RING_PAUSE_REP to config file > > v4 changes: > update and add more comments on sched_yield() > > v3 changes: > new patch adding sched_yield() in rte_ring to avoid long spin > > config/common_bsdapp | 1 + > config/common_linuxapp | 1 + > lib/librte_ring/rte_ring.h | 31 +++++++++++++++++++++++++++---- > 3 files changed, 29 insertions(+), 4 deletions(-) > > diff --git a/config/common_bsdapp b/config/common_bsdapp > index 57bacb8..52c5143 100644 > --- a/config/common_bsdapp > +++ b/config/common_bsdapp > @@ -234,6 +234,7 @@ CONFIG_RTE_PMD_PACKET_PREFETCH=y > CONFIG_RTE_LIBRTE_RING=y > CONFIG_RTE_LIBRTE_RING_DEBUG=n > CONFIG_RTE_RING_SPLIT_PROD_CONS=n > +CONFIG_RTE_RING_PAUSE_REP=n Maybe it's better to use CONFIG_RTE_RING_PAUSE_REP=0 instead? If I understand well, it has to be set to an integer value to enable it, am I correct? Thanks, Olivier