Message ID | 20240816090159.1967650-9-dtatulea@nvidia.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2060.outbound.protection.outlook.com [40.107.92.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C875E13DBBC; Fri, 16 Aug 2024 09:03:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.92.60 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723798985; cv=fail; b=EJt3SJM0s1LLudtX27NSvico+gP8bLnet8r1jjPRCOoFavO/TnbzvEK36sBuo/lTGqfqLZQKZAl6zqeul/Pcnr7ZdwqVJ8h7kT61OB4aLqtkfhRLoQA1/p2ZzwcibR9YEfwNiro75oIpY52t7Apxw4llbUfSLPgrQwXHoTymjf0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723798985; c=relaxed/simple; bh=OU8XVr7W1x9AxBwFcPSy7J1EHxdyso+fzfxQs6OSfgk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=NXhqEkDrwu3CPPXLDjiNEmgVenZ9i5UTlywP6I5iBah0jgg/QFfJnbM4P2ZtaYM41/x2wsz83Q3Lx+JABoZVJCVXlREoCbVr+LkzBEpRt/5SuQ89pqhXxTM+7CvhA6ec0AAkITigo5zB8Jmu/2D14XtkeMW38F7sPQlBKA2q0m8= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=fwiMMHjP; arc=fail smtp.client-ip=40.107.92.60 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="fwiMMHjP" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=op/uVxggXG0adf75UreguWOXs0PZAYYnFQaRjn7LIaYxieH2IQ24SDlyky3mD5JWUmOQccAnOY0XuVBiW0JieR64FPZYIENqrnDdKhLcp2bVEobFBMTT/VD7aVW/3tvf6/nkemYUgY+Bk9P4i050f71vj3+s16PvM+ZYCZ6ctGvXWK7l6zJmkcW3qRCChk1Z5MhY9HMOaX68Sgg066BHFbNDcP8o471PL4aylxIStSa79jTCXENM8B9tDzFhIAGZ2w0YS8I3a5HJqBoJ880MVlAMvUfQ18tteKk6QJeCEt+XDJ3jqtzHB0w4v8KuaMy7moOzsaxWKPUonPtEsaiAgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TxCNbitpCqlU9s8TkazghQcJ1NdNMSLTLk9+3PbE+eQ=; b=rgCx9fKOtXtSzsaBZBQQQ+0W0gUEtfiq3UNjmYxWN7/Znb39nkiZ3xJcTLuT2mQtngx6YKrP+9NOtvcY+WZBYu/1/UOLOeFJExxNEETxo917pFn56X3PUOsN4Kw51wfjMdRwZvoyD4JNBiso7VIFRlvunoa9AycFUG/BucEtqYq4X+XG/Gho7pJE6GE94FDRcDmSZGtvSiZ3zetDyxAjZL3qcZLfTZJAv3sUZNiz/rXW2uJgQZGyoKBV/BTgxkIcRABtcQhT+9X/blsqrBBCimuIGkfbZyrw6mwM4jyJXN9ygJ5Qc3xDxebGchQXxtfH6c5GbZqs9cnyNllObb5sqQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=redhat.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TxCNbitpCqlU9s8TkazghQcJ1NdNMSLTLk9+3PbE+eQ=; b=fwiMMHjPiy+qieTZvoIY2lNctdf26vLxlOqEO5qBPsetMJqatn9xeMqOwa4HM5AN2NNeTCmZkI+S0viCjfkAoG90+ZbnzwiXoHKO/5Err9uyz/lxvTIhibvtwXF8VvcZZsc2J+ABcHwZDaV2Tqji9f5AkBpQ06bP/+ZnUurzwLCh0lafh/D/+KZ5ygp3sAbdIpYvnBoFIx91k4PNbRMOsELXnQ4MzJcvtKCZSgioP+0iXxusxFdExjZ4wj8RCB1QyhkMo6M1Tt+9G+nMOWhBZ7WdU4FMqy5ybOV2gTzltwA6bCVx9NXAxgn8o6sJs9zNDaN1TE4WIGgvjm/5XOdbyQ== Received: from CH3P220CA0018.NAMP220.PROD.OUTLOOK.COM (2603:10b6:610:1e8::24) by SN7PR12MB6888.namprd12.prod.outlook.com (2603:10b6:806:260::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.18; Fri, 16 Aug 2024 09:02:58 +0000 Received: from CH3PEPF00000011.namprd21.prod.outlook.com (2603:10b6:610:1e8:cafe::6e) by CH3P220CA0018.outlook.office365.com (2603:10b6:610:1e8::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.19 via Frontend Transport; Fri, 16 Aug 2024 09:02:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CH3PEPF00000011.mail.protection.outlook.com (10.167.244.116) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.4 via Frontend Transport; Fri, 16 Aug 2024 09:02:57 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Fri, 16 Aug 2024 02:02:45 -0700 Received: from rnnvmail201.nvidia.com (10.129.68.8) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Fri, 16 Aug 2024 02:02:45 -0700 Received: from c-237-113-220-225.mtl.labs.mlnx (10.127.8.12) by mail.nvidia.com (10.129.68.8) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Fri, 16 Aug 2024 02:02:41 -0700 From: Dragos Tatulea <dtatulea@nvidia.com> To: "Michael S . Tsirkin" <mst@redhat.com>, Jason Wang <jasowang@redhat.com>, Eugenio Perez Martin <eperezma@redhat.com>, <virtualization@lists.linux-foundation.org> CC: Dragos Tatulea <dtatulea@nvidia.com>, Si-Wei Liu <si-wei.liu@oracle.com>, Saeed Mahameed <saeedm@nvidia.com>, Leon Romanovsky <leon@kernel.org>, <kvm@vger.kernel.org>, <linux-kernel@vger.kernel.org>, Gal Pressman <gal@nvidia.com>, Parav Pandit <parav@nvidia.com>, Xuan Zhuo <xuanzhuo@linux.alibaba.com>, Tariq Toukan <tariqt@nvidia.com> Subject: [PATCH vhost v2 08/10] vdpa/mlx5: Keep notifiers during suspend but ignore Date: Fri, 16 Aug 2024 12:01:57 +0300 Message-ID: <20240816090159.1967650-9-dtatulea@nvidia.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240816090159.1967650-1-dtatulea@nvidia.com> References: <20240816090159.1967650-1-dtatulea@nvidia.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: <kvm.vger.kernel.org> List-Subscribe: <mailto:kvm+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:kvm+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PEPF00000011:EE_|SN7PR12MB6888:EE_ X-MS-Office365-Filtering-Correlation-Id: 7978d7b4-8e93-49b7-4d7a-08dcbdd23942 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|36860700013|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?q?H1kzvGR2Ln67O3IKaVufqx7/mAMCvQw?= =?utf-8?q?DuFqKthysJQ8xegZ45+U1VX1Wq4oBvQDkKg5kULWxPqQ65KSkgGEsbyFnOTxjVpj8?= =?utf-8?q?T0sKbQBuMq3mhfWlfW283Jwmr/vMWA6BX6aP81JhbNxF6/X19n0MxP59MjZbRvTve?= =?utf-8?q?ZM5CHB9He/FA5b/UsoEMm8vqS7P0Bj5J+qYSsgLNOK2U6A4XREDDkAdil5NWKq8vQ?= =?utf-8?q?y7fjSQtMAKmWi3nIgsWHD1Xk61mQqUuqLChJ5q+gADNH18YKZ0L5TNh9xe/y6ycjO?= =?utf-8?q?oWZ2KKa/pinR4LhC4HJGNhhC34xl0tkP78LvURA0CD8LUyNkHX2+gXAT/rQenAELO?= =?utf-8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66ivw7Ji9PthcmU6S9lShdrc/Ul98wx5A8M8ahUr6DX1CZKqh+mXWlE3F/h4o/buN?= =?utf-8?q?NkG/tyrFsLxOA/brmWhjVtdQTCP6Byte8FiqQ9FCz3f0FTKUDCtWsCfqZlfG+rkp3?= =?utf-8?q?MJcxtYZCFfxX/T9XgWrY/yLnIHIkXNJHQotg6J1lmTFOSB0IjY1YXVuqAQyUnSaUJ?= =?utf-8?q?zwOspTEzx0W?= X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230040)(376014)(36860700013)(82310400026)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2024 09:02:57.9164 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7978d7b4-8e93-49b7-4d7a-08dcbdd23942 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CH3PEPF00000011.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6888 |
Series |
vdpa/mlx5: Parallelize device suspend/resume
|
expand
|
diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c index 0773bec917be..65063c507130 100644 --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c @@ -2850,6 +2850,9 @@ static int event_handler(struct notifier_block *nb, unsigned long event, void *p struct mlx5_eqe *eqe = param; int ret = NOTIFY_DONE; + if (ndev->mvdev.suspended) + return NOTIFY_DONE; + if (event == MLX5_EVENT_TYPE_PORT_CHANGE) { switch (eqe->sub_type) { case MLX5_PORT_CHANGE_SUBTYPE_DOWN: @@ -3595,7 +3598,6 @@ static int mlx5_vdpa_suspend(struct vdpa_device *vdev) mlx5_vdpa_info(mvdev, "suspending device\n"); down_write(&ndev->reslock); - unregister_link_notifier(ndev); err = suspend_vqs(ndev, 0, ndev->cur_num_vqs); mlx5_vdpa_cvq_suspend(mvdev); mvdev->suspended = true; @@ -3617,7 +3619,7 @@ static int mlx5_vdpa_resume(struct vdpa_device *vdev) down_write(&ndev->reslock); mvdev->suspended = false; err = resume_vqs(ndev, 0, ndev->cur_num_vqs); - register_link_notifier(ndev); + queue_link_work(ndev); up_write(&ndev->reslock); return err;