From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 090EE1B3AB for ; Tue, 26 Jun 2018 12:49:44 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jun 2018 03:49:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,274,1526367600"; d="scan'208";a="67804712" Received: from rhorton-mobl1.ger.corp.intel.com (HELO [163.33.230.68]) ([163.33.230.68]) by orsmga001.jf.intel.com with ESMTP; 26 Jun 2018 03:49:42 -0700 To: Qi Zhang , thomas@monjalon.net, anatoly.burakov@intel.com References: <20180607123849.14439-1-qi.z.zhang@intel.com> <20180626070832.3055-1-qi.z.zhang@intel.com> <20180626070832.3055-3-qi.z.zhang@intel.com> Cc: konstantin.ananyev@intel.com, dev@dpdk.org, bruce.richardson@intel.com, ferruh.yigit@intel.com, benjamin.h.shelton@intel.com, narender.vangati@intel.com From: Remy Horton Organization: Intel Shannon Limited Message-ID: <0df711a0-34df-1510-7b5b-4488a67b1701@intel.com> Date: Tue, 26 Jun 2018 11:49:41 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <20180626070832.3055-3-qi.z.zhang@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4 02/24] bus/vdev: enable one device scan 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: Tue, 26 Jun 2018 10:49:45 -0000 On 26/06/2018 08:08, Qi Zhang wrote: > The patch implemented the ops scan_one for vdev bus, it gives two benifits > 1. Improve scan efficiency when a device is attached as hotplug, since no > need to pupulate a new device by iterating all devargs in devargs_list. > 2. It also avoid sync IPC invoke (which happens in vdev->scan on secondary > process). The benifit is this removes the potential deadlock in the case > when secondary process receive a request from primary process to attach a > new device, since vdev->scan will be invoked on mp thread itself in that > case. Slight rewording and spelling corrections within description: The patch implements the ops scan_one for the vdev bus, which gives two benefits: 1. Improves scan efficiency when a device is attached as hotplug, since there is no need to populate a new device by iterating all devargs in devargs_list 2. It also avoids sync IPC invoke (which happens in vdev->scan on secondary process). The benefit is this removes the potential deadlock in the case when a secondary process receives a request from primary process to attach a new device, since vdev->scan will be invoked on mp thread itself in that case. > Signed-off-by: Qi Zhang > --- > > drivers/bus/vdev/vdev.c | 30 ++++++++++++++++++++++++++++++ > 1 file changed, 30 insertions(+) Acked-by: Remy Horton