From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4B02DA0562; Sat, 4 Apr 2020 23:51:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A5D762BEA; Sat, 4 Apr 2020 23:51:23 +0200 (CEST) Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by dpdk.org (Postfix) with ESMTP id 4774CF12 for ; Sat, 4 Apr 2020 23:51:22 +0200 (CEST) Received: by mail-pf1-f196.google.com with SMTP id k15so5532138pfh.6 for ; Sat, 04 Apr 2020 14:51:22 -0700 (PDT) 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=2xhySK741woX7TZ2t0A1mt+qqWk5jar5nM0IADdeZPU=; b=xiuQimPDawISph83ZC6H4p2Us044U/A+EsXiw4rLjcvvxSTCqmeJbtHsO7J8K45DxS 7meiLtmY7huxfxpc34Xz4/3fPWkA/QCgrQBxtU701h9sdRFBsbPc7rT4YxPDJqFArMQ2 J1lyMeK8jNAPs+CnEOlX1VShsyZfZ/VrCY9TC6DKeWnPw59LdvhP4JgD15ljppVbwu+T WQFLWpzaxk06+sA1aga1nhNCpJY/uNjzuUR2S3ppdsIRH/G8nL6IGHIxl7CoSaPXG7lY UAjQQ9uKU7Sj5q+6NVIbXBHvRTc5dd2Ua+Xp5vHssjw4nuEHMidka26p/YBppXOCOXcN 9ptw== 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=2xhySK741woX7TZ2t0A1mt+qqWk5jar5nM0IADdeZPU=; b=CwbnvMq+J5ZFfCiviuU4vuFviPYQ1YiBqz2Obd9tf57fj6eAscAk3xiz3YUcTMoj0l Sibb59F50F1I4747nm3VLh9Gz8Wb46awz6S0+uMa8p0wdEJAtmHSz0ZySKO7HQ/xCwT8 GDnh2g0n0DoTqSYNnXTad2MvosyXJnTkCVVej6qnXsbSCMmtk177fBGM3F6cr6xid00E lvNVGU6FaLptIt98r7pO3z18Vxn2TZ0c/CTZxpQyXTtpYSXILAYzuF9TV+0RPdr1Gi29 h0hQLTAlXrLmYOB++1Km1LttQ3MF7Z+J6kOePmnJTxRudqEEvtsGAocArGLK3fz0HyqU SmIQ== X-Gm-Message-State: AGi0PuaF7QIpYFcHfUsw1zwVPfe1pxrAXZGP1UGnC3jOwVDDO35kJM1H +w1qHV3g8l3okzqPGT2ZK50ecQ== X-Google-Smtp-Source: APiQypL5KmkpZCQwFd9s/1VZH8BIfjrfRxG3FilK06TE0NzeOY3yxVR9+ilGRpbTZshkjM521L8MnA== X-Received: by 2002:a62:a119:: with SMTP id b25mr14577152pff.158.1586037081454; Sat, 04 Apr 2020 14:51:21 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id w9sm8450797pfd.94.2020.04.04.14.51.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Apr 2020 14:51:21 -0700 (PDT) Date: Sat, 4 Apr 2020 14:51:18 -0700 From: Stephen Hemminger To: Laurent Hardy Cc: dev@dpdk.org, xiaolong.ye@intel.com, qi.z.zhang@intel.com, olivier.matz@6wind.com, david.marchand@redhat.com Message-ID: <20200404145118.218288d9@hermes.lan> In-Reply-To: <20200330143330.7427-1-laurent.hardy@6wind.com> References: <20200330143330.7427-1-laurent.hardy@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] i40evf: use non spinning delay when issuing AQ request to PF 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, 30 Mar 2020 16:33:30 +0200 Laurent Hardy wrote: > When a port is handled by the i40evf dpdk pmd we could observe a cpu usage > around 70% in case of rte eth stats functions (rte_eth_stats_get and > rte_eth_xstats_get) called periodically via an application control thread. > > This is due to the polling mechanism to handle communication between VF > and PF introduced for x710 (eg: VSI and virtual channel). > > After issuing any request to the PF, the VF will wait in a blocking mode > until it gets a response from the PF or until timeout (2sec). > Instead, uses rte_delay_us_sleep to sleep for ASQ_DELAY_MS, which will > use system sleep and will not block the CPU core. > > Signed-off-by: Olivier Matz > Signed-off-by: Laurent Hardy Any thing sleeping for that long (1ms) should never spin. Is there anyway to use something like a file descriptor/interrupt for something this long?