From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f68.google.com (mail-pl0-f68.google.com [209.85.160.68]) by dpdk.org (Postfix) with ESMTP id E5E703250 for ; Fri, 29 Dec 2017 18:13:53 +0100 (CET) Received: by mail-pl0-f68.google.com with SMTP id s10so23250074plj.5 for ; Fri, 29 Dec 2017 09:13:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RETPkqfQX8K43VQlsEysZgjxRuw2MbzfVHvIGV4pwxk=; b=XdWGraBu6LvkI/25gTTkfOaSLP/dC/6RvAncAb1TprjTAWTI0DUwnCIEuR9swIFcUm 9+zV9T9mhhOvkQYGujCXENmGzoYePaVbsBHwtv7GyNmnghv6SoICDP+pj5VDvjvGVT+1 DxO18JY2YqZkTGLIR1vhVjaYmDZ0cEd+8+qikOfbrN+IuP9VUwWiPbbCx5zk8L8Uxbin 4ZMj7d2awIPy/ivIhUyswCR/jSbCI0tJ8uAfVA5NcVlO4DJLlT2yr/XaAhDYbO8AZjkV lzrwqanF6oOCVufVKLZXGyxt1vOCTS+d2C24JXrniwvl+JQRwTQnOZ4F5oeK5Oyn0/gi +Jcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RETPkqfQX8K43VQlsEysZgjxRuw2MbzfVHvIGV4pwxk=; b=SpRa7T1ouhkg8JeOzCWaeM8dyJce000/d3+owIPWvFEmp16MNMcZddlQvoT5R4m/j2 1UgcPoV1P2s5M9arVU7/p/N3Dstfewo36bESexToiJG4rZcfGTD/rIr1rUgr3O8/AFEl 7umko3DOg1Pt7InbpJyNZCzGpoMZZk72lA/WacUNQa7cT5ewzGtnpGbfCRJ3Gdz5QDrM FScIPdytXtjmaLIeZssGgoftOqJec9ZBAdipfrBnOD5UsH48XLK/UmxBql5x07UkASrx Xmvm2cEO3z3fcJtW2P6y5Da2XNwdNnCTCfTmwlDqXJBTdZcX8KjOtcn9FMafOZ02qXZ7 aBNg== X-Gm-Message-State: AKGB3mI4/TUCq+NZASlsh3IsDclmUt1L+Idky6Sxl54GryvTsGwiCZ02 KIFaxxprRoQ13sBaW5p7CEnz+A== X-Google-Smtp-Source: ACJfBouCMUlC7gXGlQhcim6HuQIuQXj1L2AsIcg5Ua1AnzG24MOp+e2ky1tdVDN32RsO41yH5XnBdQ== X-Received: by 10.159.242.10 with SMTP id t10mr36325204plr.227.1514567633066; Fri, 29 Dec 2017 09:13:53 -0800 (PST) Received: from xeon-e3 (204-195-18-133.wavecable.com. [204.195.18.133]) by smtp.gmail.com with ESMTPSA id u90sm76979299pfg.106.2017.12.29.09.13.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Dec 2017 09:13:52 -0800 (PST) Date: Fri, 29 Dec 2017 09:13:45 -0800 From: Stephen Hemminger To: Nirmoy Das Cc: ferruh.yigit@intel.com, dev@dpdk.org Message-ID: <20171229091345.31022a59@xeon-e3> In-Reply-To: <0a4ff780-55fc-7c42-e3ab-b6b22a73cfbd@suse.de> References: <0a4ff780-55fc-7c42-e3ab-b6b22a73cfbd@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] KNI latency improvement 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: Fri, 29 Dec 2017 17:13:54 -0000 On Fri, 29 Dec 2017 15:27:03 +0100 Nirmoy Das wrote: > Hi Ferruh, > > There is latency in the range of milliseconds when packets are passed > through KNI up to the IP stack. With CONFIG_RTE_KNI_PREEMPT_DEFAULT=n > its required sacrifice a cpu core. Do you have any suggestion to improve > latency without sacrificing a cpu? > > What do you think about using cond_resched() instead of > schedule_timeout_interruptible(), in our test it helped to reduce > latency? > That fully consumes a CPU core when doing KNI. It would be better to figure out how to use a a NAPI style API for this. I.e keep processing packet until idle, then poll for a small window more, then if still idle wait in kernel to be kicked by syscall from user space.