Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1551202lqo; Sun, 12 May 2024 07:28:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVfmYWSzLWbxUy1X63yB9nxB49ce09sopx5FIfXou9xZU+DKWe+6k5CskNcwO5bVF+B7xqO9kYi4B9W80dKiL/dQU/e5H4d7lkGEx6P8Q== X-Google-Smtp-Source: AGHT+IGndjzKLS6hjyHMQU6NNZqJsDJZ+tFC1r0RQiCEEQZFO3GwawniXoAwRJZDP2ovxUttoACq X-Received: by 2002:a05:6214:3d8d:b0:6a0:b9bf:3cb3 with SMTP id 6a1803df08f44-6a1681da9a9mr99420716d6.34.1715524130101; Sun, 12 May 2024 07:28:50 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f307885si79320886d6.582.2024.05.12.07.28.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 May 2024 07:28:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176899-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=shBh7XZu; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-176899-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176899-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C3E471C20B91 for ; Sun, 12 May 2024 14:28:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9FFB54776E; Sun, 12 May 2024 14:28:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="shBh7XZu" Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2066.outbound.protection.outlook.com [40.107.94.66]) (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 1D59D42A8E; Sun, 12 May 2024 14:28:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.66 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715524088; cv=fail; b=UE94kMWyt9zGIEmRNHexAVlzaj3gnDwvJ8UZSa/c4YDLA++2aiGN2X0wpW3sTUljA+DqtGmlRhBT7DSoU99vBGtG/hRYZzH1mnySSXnZR6Z1cONbeHKN9U/BJ3FlMt4akujvPme5Q/c0WvyEBRjf/3CYmp2v8UY/PfX2XKTcoKo= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715524088; c=relaxed/simple; bh=Ew/jfVJArBqoTLvbtuZhuqeyLhxoSexC80nxgq2R4ts=; h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=cKj+D3IOmHHt5+ZTsgsCMkRDFkZjOsmVt/OaJbFRRiL/yVhe1lq5BRW/d268IPY49oZXnJ/Bls86mGJ+7s4BRi9Vj3AxHHauuYDkGxXCvBLs4761aw+Dsfafr0U+kqbUyFtc5K4PMNTGYnq1fjChm1b94yoGIssUCmfPzykpccI= 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=shBh7XZu; arc=fail smtp.client-ip=40.107.94.66 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 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QMSd4AfiNdGQg3vgM+AYwpdMVD99OYuZF+gwb5rpH14Fcyy8+nXazVs+J5Jcv9sz6qmPQR8W3JdO/RtD7pvSt4XlO0iHBbrNvv+JiRGtiOIx7G2d7GHa/WOH6vBqYITnBsSvKuFiJIUNfSngPsFTsMhVBdFtpP+vV9rI6qE8213tcQV1unyJOdPD7Lh/GZ+pFWn1dsn6/Sb+AaMsF9dzDKp5iVzO3g6jQKg2HqD/Gtu3WjmmTgvcNLGENn6t2qQSKd7fDVXxeyEJhHogt6g+V0XtsUGMS725muDm+lhsc+uMqkR+vjwnoKY1u6Wp8cWotuCpOYjOH0P4N+/afIl22w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=LSv0s/1kfncmFjrayaQrotpp0/BB2UgJ6lo2pNme4v8=; b=gjKRUVCV/ZhEsb/PBIdUMwkEtIryCqYkaI46GMAyntCaOh6apFFftwM1X7dJOjnF2XU4ONx9SGqvLyLjIcKq5kZsXsaAbVfOhcTU3QkTF7QLV2C3MjCJPzmcDC9FJPgIeCemIFZoVfY4e0PR93OSUYRBSlDMNb/pRYLOPBLuEiahVbijmX8a/pEgwm876hJtUlAh0H4HAJkzXk1tyyM0Q6/DNt8dAOyRSidcVVGRupHeRG9VsNsXQ/5HuEk0zN80KVN66amPxeOPWWIWeWErpbwz91c64MudHchqI8nopDfBXOYYYcoSRr+NTvEJzvfcLev0mo1o9bZz0uwv4X/NPw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none 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=LSv0s/1kfncmFjrayaQrotpp0/BB2UgJ6lo2pNme4v8=; b=shBh7XZuQgg4E91/uwWSGF/jtjPU0OmK6zHBYu9qwK02opyhaCjrbsy9tO/Un2DsIztMkMqSKoNgaAypJ+9yQ3aSY95T+v7eoW4G8ULUPh2Z3Ah7GRcjvvoqhftInSLFId5onvo6iHHEPePgTwJPN2OuEaHDphxe+E5j0fk4ybGxEYvpwy3sPinTGo0MFJsK7fKcnzWTMjM/e/IAvGCD7VeJNqKAOl+5a9jxbWwZyT6JcKNjSqfpR2aEfoGIa4Pk4Ae4hDSpJrKLhqYeg5I6VcgQlGG3j6P0AV0rLluyEp0pmvZgIPAyAw65F5xbikHw9nD5EWvi+nwLhbOLQBgwYQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from DM6PR12MB3849.namprd12.prod.outlook.com (2603:10b6:5:1c7::26) by DM4PR12MB8570.namprd12.prod.outlook.com (2603:10b6:8:18b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.55; Sun, 12 May 2024 14:28:02 +0000 Received: from DM6PR12MB3849.namprd12.prod.outlook.com ([fe80::c296:774b:a5fc:965e]) by DM6PR12MB3849.namprd12.prod.outlook.com ([fe80::c296:774b:a5fc:965e%4]) with mapi id 15.20.7544.052; Sun, 12 May 2024 14:28:02 +0000 Date: Sun, 12 May 2024 10:26:44 -0300 From: Jason Gunthorpe To: Nicolin Chen Cc: will@kernel.org, robin.murphy@arm.com, kevin.tian@intel.com, suravee.suthikulpanit@amd.com, joro@8bytes.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-tegra@vger.kernel.org, yi.l.liu@intel.com, eric.auger@redhat.com, vasant.hegde@amd.com, jon.grimm@amd.com, santosh.shukla@amd.com, Dhaval.Giani@amd.com, shameerali.kolothum.thodi@huawei.com Subject: Re: [PATCH RFCv1 02/14] iommufd: Swap _iommufd_object_alloc and __iommufd_object_alloc Message-ID: References: <43bab81816a7bb08fde868a43d62c439ede91f9f.1712978212.git.nicolinc@nvidia.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43bab81816a7bb08fde868a43d62c439ede91f9f.1712978212.git.nicolinc@nvidia.com> X-ClientProxiedBy: SJ0PR03CA0268.namprd03.prod.outlook.com (2603:10b6:a03:3a0::33) To DM6PR12MB3849.namprd12.prod.outlook.com (2603:10b6:5:1c7::26) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR12MB3849:EE_|DM4PR12MB8570:EE_ X-MS-Office365-Filtering-Correlation-Id: a2cb9520-62ce-41e4-a602-08dc728fbaca X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|366007|376005|7416005; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?PaNdz7fQXLQZN37U7qAMWmOd9+4queqBej1+OJCzOMKqEFfCudtHZtBkU456?= =?us-ascii?Q?cCp3T9i0nY+c/yzlz2n7TVBpEGRnKouexMoBDtMHcsPDxl03kzsub8j3IVf1?= =?us-ascii?Q?oWSRmd8Uxvu/e72VpZKiwcNXcHpSNW3LWJXthyJQ1tjDUXYOlKlA8K2ni0G5?= =?us-ascii?Q?CxBZ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?us-ascii?Q?Tv9MD9P4TFBZ0TDshmN0xVZ+HMh30esJZyjH+GDzST9P3hu3lFQB4LzSlESB?= =?us-ascii?Q?R1M+d3LjgVvcJ4D1YWfUTcxTlbVZZs+P/RhxgQdOeSYLx7oQS/ZpqA0QE2Tf?= =?us-ascii?Q?+onpZOE/HhA5TVm+94xGQalRMqb68CDNT+gokpkUki7vV5G7QdaiEFbq9PEE?= =?us-ascii?Q?woCfYfgMFwQUtTXozQQPm+d3mZkRyVkf8iUfqb5FDw=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR12MB3849.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(366007)(376005)(7416005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?1oXxczY2Bcasam1ll3Yk6kswdKRd9WIADrIUPwZAOuVecB0JvFlbikge2Qo4?= =?us-ascii?Q?EJlqBdZBLOlubnSV892PjS7Er0C/SXgEx5lq8iYLJQYMOIG5ccJwZeDXFdMX?= =?us-ascii?Q?Aafq+2fjZj5sEFdfBmqQpN3sgBdNfiEoIZN/65asvuu9poN6MxosymvSOJJM?= =?us-ascii?Q?LVCS2lCWtrWZDTAUVKvg/wmNEC8twsoHVBgugIar8ZJRShKiKI52qC/5PtqE?= =?us-ascii?Q?7xbfosVmIpfzzty0dDaSCauqZF/NOoa7Zm27aIXWzuJeBIXjSZmzUSFWc704?= =?us-ascii?Q?kws1yFZxDTdujBdeqFUw8gy1aa1G0Wz+v1eBlIrEnZ/pysYDTdhPKDmxekZg?= =?us-ascii?Q?37ESpnGzaFsbx+yQBnHdaIfTmQglTa+8hvWjo+vryj57ZIkM4ZAZyLe+kPbI?= =?us-ascii?Q?w2yJhpH3QiX38bDCu73uZodrQgvKqSRkmlYfJ5q5mUP21F3RhfGNv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G3cdZyHo1t1Rm5aHKkk12eojW3PxoHd8dZw?= =?us-ascii?Q?fscY4DWpSu8N2SWHrgUBhNjyUP22RlNHEkOlB37Ro288Jxk2aiOxwnxZbIv+?= =?us-ascii?Q?GVSg3Z6v9AweHN/N681JDoJuB+HWpkrIs9YSPiS/dNoUrf6KTIMx9uQovo2i?= =?us-ascii?Q?6kgfUBZTnG8dbpqjrfQrAPl5t2SXxkvNavbCVjQ/eWMXAvZCI6iUXxKAM53P?= =?us-ascii?Q?hGh3CaMn+mkxra6uohxosweGCIvK27XD8rYAjOkM?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: a2cb9520-62ce-41e4-a602-08dc728fbaca X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB3849.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2024 14:28:02.0585 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: yWl7LJUIt/DDV+beI5t6L76hDCvqWK2uR3hjX5/3KVLJvha96ZlCduHxmvhbp+Tx X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB8570 On Fri, Apr 12, 2024 at 08:46:59PM -0700, Nicolin Chen wrote: > Currently, the object allocation function calls: > level-0: iommufd_object_alloc() > level-1: ___iommufd_object_alloc() > level-2: _iommufd_object_alloc() Let's give __iommufd_object_alloc() a better name then It is a less general version of iommufd_object_alloc(), maybe iommufd_object_alloc_elm() ? Jason