From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60040.outbound.protection.outlook.com [40.107.6.40]) by dpdk.org (Postfix) with ESMTP id D77ED5F72 for ; Fri, 8 Jun 2018 14:08:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=J3UlprkpcobUiCX9+tO9WC1ZYv0w1nJodxeJbramzx8=; b=XAIJVtQTzdvN8VxjCKPjSorFIbU/e8PyDU9qRx5JK/nZwvO9PixcinuynSlmbQ3Dy/uz/ZRwYLO9LqdcbntagbQfs6jPVgeBVhxYt3+1AAhQgS3tbUzcdruQ7ZIFNqOkr/WbSL4VylkyDzYZA8WQWe8rL/W9yjkBaRok7s8EU7c= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shreyansh.jain@nxp.com; Received: from [10.232.40.129] (14.142.187.166) by AM5PR0402MB2770.eurprd04.prod.outlook.com (2603:10a6:203:98::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.841.16; Fri, 8 Jun 2018 12:08:35 +0000 To: Qi Zhang Cc: thomas@monjalon.net, anatoly.burakov@intel.com, konstantin.ananyev@intel.com, dev@dpdk.org, bruce.richardson@intel.com, ferruh.yigit@intel.com, benjamin.h.shelton@intel.com, narender.vangati@intel.com References: <20180607123849.14439-1-qi.z.zhang@intel.com> <20180607123849.14439-3-qi.z.zhang@intel.com> From: Shreyansh Jain Message-ID: <81ec16de-38a4-9d9d-ba33-26378fd00d63@nxp.com> Date: Fri, 8 Jun 2018 17:38:20 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180607123849.14439-3-qi.z.zhang@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: SG2PR04CA0145.apcprd04.prod.outlook.com (2603:1096:3:16::29) To AM5PR0402MB2770.eurprd04.prod.outlook.com (2603:10a6:203:98::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(48565401081)(2017052603328)(7153060)(7193020); SRVR:AM5PR0402MB2770; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0402MB2770; 3:HR89i72st32kmgyvr9Me+ie7K1txsnzvNnxKDjEFK0Jhcz3zrPHnSu6pjXbBhqiQ9ItH9vxSJ5gtUnDS3qBAa5PY+lJJzOIMUwJnCS738eySHbHi1qwYdDN9ihuyMoNzGmbYNZRZ3ikG5uTOS4WX6GGkToICsCYMSeeViD5EwFyfpCS+r7Edm6d1ZT+qNZpxuc1TqvJGpzJ4iDIl8KZFCoAkEmesYgiuvYKVMYYpzuGoypeyMpajS9HUIFkdxWzw; 25:l4wJSulEjt+I0MJoPs+vtGCG/yvttbBbjygyVI+PEt0ES41zSuZZ2Zk/cjxYmsQ0WMlZ0X2EJ4wLrdWbLmpn+3FYQRuFQVkrAYRqNh4DxwiQESZYXNoZ9Ud7w5kYcE9TU4R7b3l4WDc34qzDFDG9yB8dUVFQ0eexJYVUhmIS6rvYjnu0y4AtSjP/5mJk3uR6TJ/5d5wvBv3Z2DgfaxH2aAkdMQkL7OuB4HADSbxrLU6NVJuCOKLnlq9HlGuAUlwHtwYvVYS1UGR6bsdIzuQpX32J1VtkJj5LzrERFPRQRWmsdRd2vZW1EZMxuRDDVlu+GSA55XMag67DplaYPdfl8A==; 31:I9PAbstXyifNjX5NscSGxYTjaVBV9q7yyZd5sKTafvSpBw/N7ODI90Y0Wmv88/6HTr7q4xFh6npjxIbG0qW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 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:AM5PR0402MB2770; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0402MB2770; X-Forefront-PRVS: 06973FFAD3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(396003)(39860400002)(346002)(39380400002)(376002)(366004)(189003)(199004)(67846002)(478600001)(52116002)(446003)(11346002)(23676004)(2486003)(52146003)(26005)(44832011)(77096007)(16526019)(186003)(59450400001)(7736002)(476003)(305945005)(25786009)(386003)(53546011)(486006)(55236004)(3260700006)(47776003)(65956001)(76176011)(2616005)(65806001)(229853002)(6486002)(66066001)(105586002)(316002)(16576012)(956004)(5890100001)(31686004)(8676002)(64126003)(4326008)(58126008)(106356001)(2906002)(68736007)(81166006)(81156014)(230700001)(36756003)(6116002)(31696002)(3846002)(86362001)(50466002)(65826007)(6246003)(97736004)(5009440100003)(6666003)(5660300001)(6916009)(53936002)(8936002)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0402MB2770; H:[10.232.40.129]; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtBTTVQUjA0MDJNQjI3NzA7MjM6SHVyQWk4RVJxcHozeVU3d3VQN2VlampL?= =?utf-8?B?T1lzdGI4cWhVU0FCaWtGRUdYUjVwcUZvU2Jrd2h5djVOdWNzcVgrc1l6MlFz?= =?utf-8?B?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ZEH6ENL4mkzm87yJZTYg==; 5:EukZBt6f20/HyQpwgZTA3UsEnemgssZxt5pcXgzlYSrr9h7r8h7Rc2C9bLPnCDsyB+yqlwk4M2MxWLgOp5b5Yi5qVVZt8ue8ZIUvmHiy7YT0DcjUrKeM9CP2hZdGDpuWHU1EArOVIJ1vETtCeEFxU6FEW6Hv9aFsFfHFbRgBhfg=; 24:gTsV94Xv+zsWfCH9WC1onzvNTaymTouD9cqsdeEUMRRacO5IS3uNNDHH+i0c5SQ3C4PXePcEc8sslr0Jz8DiBVPYfwvD/1hv4FEIofWsuo0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0402MB2770; 7:HouBHaSPEydajj9WSJWzJZBd+myWR2AzC6JZovDljTWjYWcfv4FPb+itxZnOL5ye38FXN/9MEnG13/OugEHETf4RpK6Mm5oWinFYU6esH6PFppHqQDfDrXznLxgFCsb+ZfExspDlfFxGXzFAbxgyiQyyyYAKaxcL+xdGKNHY4/BDW8g9Tm6SeL4lqkZa0pmbTg+4m2SZOM5cLWQUhBWBAS6J6Z+ODq6CKKmWekVC4S3gaiWv92s08DrIYUjzywfr X-MS-Office365-Filtering-Correlation-Id: 4a97dd36-76df-43e8-6caf-08d5cd389160 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jun 2018 12:08:35.2515 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4a97dd36-76df-43e8-6caf-08d5cd389160 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0402MB2770 Subject: Re: [dpdk-dev] [PATCH 02/22] 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: Fri, 08 Jun 2018 12:08:40 -0000 On 6/7/2018 6:08 PM, Qi Zhang wrote: > Implemented the bus ops scan_one, besides this improve the scan > efficiency in hotplug case, it aslo avoid sync IPC invoke (which ^^^^ also > happens in vdev->scan on secondary process). The benifit is it ^^^^^^^ benefit > removes the potiential deadlock in the case when secondary process ^^^^^^^^^^ potential > receive a request from primary process to attach a new device, since > vdev->scan will be invoked on mp thread itself at this case. ^^^^^^^ in that Besides the above spells, is it possible to re-write the commit? You mention it "...improves the scan efficiency..." - how? Is that an implicit output of introducing the new scan_one for vdev? > > Signed-off-by: Qi Zhang > --- > drivers/bus/vdev/vdev.c | 30 ++++++++++++++++++++++++++++++ > 1 file changed, 30 insertions(+) > > diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c > index 6139dd551..cdbd77df0 100644 > --- a/drivers/bus/vdev/vdev.c > +++ b/drivers/bus/vdev/vdev.c > @@ -467,6 +467,35 @@ vdev_scan(void) > return 0; > } > [...]