From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH] kni: fast data availability check in thread_single loop Date: Wed, 18 Jan 2017 12:35:41 +0000 Message-ID: <1d063572-a495-ce22-b605-7c748f980b61@intel.com> References: <1483053795-8489-1-git-send-email-s.vyazmitinov@brain4net.com> <4316d3de-8159-fd34-8515-f82ba33b31e8@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Sergey Vyazmitinov Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 040C7FA43 for ; Wed, 18 Jan 2017 13:35:43 +0100 (CET) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 1/18/2017 11:05 AM, Sergey Vyazmitinov wrote: > > > On Thu, Jan 12, 2017 at 12:29 AM, Ferruh Yigit > wrote: > <...> > &knet->kni_list_head, list) { > > + for (i = 0; i < KNI_RX_DATA_LOOP_NUM; ++i) { > > When there are multiple KNI interfaces, and lets assume there is traffic > too, this will behave like: > > KNI1x2500 data_packets + KNI2x2500 data_packets .... KNI10x2500 > > After data packets, KNI1 resp_packet + KNI2 resp_packets ... > > Won't this scenario also may cause latency? And perhaps jitter according > KNI interface traffic loads? > > This may be good for some use cases, but not sure if this is good > for all. > > We can decrease KNI_RX_DATA_LOOP_NUM to some reasonable value. > I can make test to find lower bound. I believe the effect of these changes differ per use case, and load on interfaces, may not work as well for everybody. > Also, the point is in fast check for a new data in interface rx queue. > May be will be better add some kind of break after several kni_net_rx calls. > Without them loop ends very quickly. > Anyway, this patch decrease average latency in my case from 4.5ms to 4.5ms is too slow, can there be any other issue? > 0.011ms in ping test with 100000 packets. <...>