Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2334535lqo; Mon, 13 May 2024 15:31:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUFjNIpwdqR1se2AILU6ctdy8ALMuSAulf1I6bwB+DBhKyX24GOWEI7wWMndSVHi4r4q20taP20RoQNeWkdhWqO0Qm0GkskbzkFUxMeVQ== X-Google-Smtp-Source: AGHT+IFTPEj7Y5okYFy36ZFtgwjPkL3JRnNkejnmYNegyxIKQZO4rmLjzYbv2wfralVt8D/+F7Ga X-Received: by 2002:a50:8a95:0:b0:56e:2e41:3c39 with SMTP id 4fb4d7f45d1cf-5734d5e33e3mr7439511a12.19.1715639475756; Mon, 13 May 2024 15:31:15 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733beace35si5442287a12.121.2024.05.13.15.31.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 15:31:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-178139-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=Kf3PL3eK; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-178139-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178139-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 53ACC1F222CF for ; Mon, 13 May 2024 22:31:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4970B84DF3; Mon, 13 May 2024 22:31:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="Kf3PL3eK" Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2069.outbound.protection.outlook.com [40.107.236.69]) (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 C65F1D51A; Mon, 13 May 2024 22:31:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.236.69 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715639466; cv=fail; b=JgtTpd8LgyOdPZ7u9Ag7IxETwre1PM9AJLfirHgOIp+0Wno6R2ody/bMH0gI4fKY+HtH5eUJCV0kYjHfKFPTE29SqRZPeWr/OROxDdTQ8AgVkFTO+GpmKzmBrLllDNUupS9XBNm+baaLNJIUoL+W6bzW1R+G9rvHGz9FWQ2X6mk= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715639466; c=relaxed/simple; bh=Ih8G7utJPq1IFV0YPLerxzQtXWE4zh4MOdXICDgC2ek=; h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=lIPnM7SEgWuEjZm5CMlhJoGJSzoaZCxzb2PWUc5kHfebZAPddAqYFt0Z6MgMzdJnZbKIfyA8iha709K9loBROVT0NiUx03lV7HBxnvi6BgRcne4FWzzzwE+ds2JlzcDyvTwntsW97tjZk8lGquqNOmmtKOg/egAZp1PDNTm4N/s= 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=Kf3PL3eK; arc=fail smtp.client-ip=40.107.236.69 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=PnWiJk5xCxyxQyEPMB718s8qyP6WJsiHsa3Ng6T02KtuxX9dvzeVzpa2qBWjnEchZHlotogQdsbvH4LndtbcVgmDjYwicQ8xZ8lHfgm8+mIrHclD+E5CCZitCq797gHatpvjhVAklMKbJ+LfNiNajsx44Gs35KLfx37t3BF23zIkP4MvY/6kFq6e6Pjvt/1UnSj0SFlXiawmYDMichsnrAYsQzpBAQVtEYMlzI6vykMKYDyZ5na//b3O2xp04frTw03mhSJvF2VmrjzSkF4IBPp291GliCqRrDKM0HklkepMUHsVlKxQSy8i5pH0Esi7CBmwF9ywJOjU5rMJ7HtYvw== 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=V6uPQqsDtSy3dWjY5u2Z92DsyhEkRjC2zOcYS8SCMaQ=; b=aI/F6pyKgDnx5npd3TorwBYJgN7FJDqqk7H0jvC4wGbKh+vKmF7ZvxG8+cOntPdkllBIf6m/xU3JGL/Oa4AosdqtEl3OGIIZdhiYohk/EYi0xWXqfg6FdcFx7/4SazHqwXMyTkUh1BZrm8C5Zf8G2qz7OYBGsBqvN+KPKaisFCRu7RPCL1R+YQKqUqTljNB6yKsBMnRAt4r+aT3P60hOooieRuiP+9whfstwzySyJYXyyucOvPswCrViVyaSjMzBWNF3JIqmXPc8LR9yrZV5L030FGUur4FgbL1ubdSAL6/1UgHr2v4krcJebvZgXh7y9T+tddPEiAC0NELsyIwwUQ== 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=V6uPQqsDtSy3dWjY5u2Z92DsyhEkRjC2zOcYS8SCMaQ=; b=Kf3PL3eKdjYUcpgE5ujgJeyDhNycBOJ+cCYrWGZpTVdFUnG8MdeESc/NbYfzvI+jjRgUKrwYIa066+ryOGl6Gamym+tMdv/lKMS0DK6FdzBCPTMeIJionJ/AyfeezHjXn28chdUVJhQSYlD+RVzwfgZ4ClxLKtcbvcRuYlskyzshuD0tYYpU4G9rKWxOqB/YSpYJCXuhfCrSXd3JdjssjiEcZhNIDhV5Ce5azNKD7MAFOogebdk/jrVOPyjcuU1bjlGqzyBmgZ2wev4oZd/uKQBddmSMTcCfvQGKgCpbwv/j16W6QzvTg2/J/FfG5msLOl/RZL0/R9PkhofUwTPG3Q== 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 PH7PR12MB5709.namprd12.prod.outlook.com (2603:10b6:510:1e0::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.55; Mon, 13 May 2024 22:31:00 +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; Mon, 13 May 2024 22:31:00 +0000 Date: Mon, 13 May 2024 19:30:59 -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: X-ClientProxiedBy: SJ0PR13CA0051.namprd13.prod.outlook.com (2603:10b6:a03:2c2::26) 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_|PH7PR12MB5709:EE_ X-MS-Office365-Filtering-Correlation-Id: 4d0b4dba-8201-42b9-12c0-08dc739c5da4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|366007|7416005|1800799015; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?4pMNyg+zBSSJncjw1cxzER8+Dq1FV+wXkuaHAEorDzKQG/Maz+JX5NL84OMp?= =?us-ascii?Q?996DKsIvzH1kZsg6YHC+0NjCHEe2DR8xsDqEsMRe51UY6kKf1mJpsKbgiDCx?= =?us-ascii?Q?OcogSKhSpazv5VM/ptLZV7rp/tUR4ftppDIN/sPp02OgYh/3vu3uS26iErtQ?= =?us-ascii?Q?CNqUmQg8sOXCc1X123cKUWo3zw0n6Jc6BZes/t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VzFyOVVnRfjQrjlDMCbLBpx+tByfQwbK6JVn13/ALHpmzcI4+RyOO+o?= =?us-ascii?Q?mtPuSDywWnvuPR/g4BtNlJfsUpPLRAig5oLwAOE7E3SxFE0MlaYuZ8TSp5gB?= =?us-ascii?Q?Rwa1bfL8Ehv4PAegEcunT6/sgDgxsIkTPKoSn/7adPQyx37GpkTKEhnNOpRN?= =?us-ascii?Q?MJ2M7hLiBatJ4Z/6Aur4TE2/CisBS1RyCwK69FP2Qw=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)(376005)(366007)(7416005)(1800799015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?h0YSL8kAKmp6w7FAInWvRey/Jc3HgEzz8nlJQeeoWBWTQtvWhTAoJpb9jclN?= =?us-ascii?Q?zmASUCA6hngTXXWnY4qi8nRsY5Xyvs1WIkG3uUXC3T5VSNoJybioIxJrkBE9?= =?us-ascii?Q?SilTafhImfMOFm3hbIpxr/cOb6tdWcVF7mWoumVZD2m9Ptd/TJyGEl6p3Q+Z?= =?us-ascii?Q?Oz5wkLIpS/TWxcynD7z+RxTcsQVcVyAj419jmFuEmKvNRf4GB2+ml73XoMnl?= =?us-ascii?Q?ngpHJWy7JTU5F6DCBFhfTS1ZgxSTq8vqNtzmM8noGrl8TQAWVOHbQiLSklj0?= =?us-ascii?Q?Fyw+r6XqfY2UTOCr+eZp8NHwDvzqDFjlb9z2c4zvF1IQePUJpr4da+dhvgtr?= =?us-ascii?Q?cC9YzGul8MQjvRcjKGRJBiwSXlc9k9P3lyQM5tcX58Kqc5UlXPbEW9v7BAQ+?= =?us-ascii?Q?zekuD9WkijJI1ZuD5LKXQyzn7jCMXn9rm6VN5HIU6wuBgV64/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aOjfHsmzNXk+pEbDet7zgbh0mIjrCroXtSKvPLHDk3t36/l?= =?us-ascii?Q?oiUg3Bn/iCpOo0AQD+wYqk1hZnJKEzth+fkSu1xTxuMsJr72X+8e6zfVn7Iw?= =?us-ascii?Q?B0yEG1qAH3glnfFCFahw9iE/gXOMGZkUaMKINlLDOSC6rwpJMw2tgy2sJM5Y?= =?us-ascii?Q?XN5GkXDZuTBoJXBKdol25xLK/N7QTO/VeFgkxNCtECnWB/GfMOde2Yqc+W7J?= =?us-ascii?Q?rWpp5VBG0rLLwSMnMxo=3D?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4d0b4dba-8201-42b9-12c0-08dc739c5da4 X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB3849.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 May 2024 22:31:00.4317 (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: VNq9IbJ/HhTAkdJn8joxZfDQmcK8uIGIVUoM4HSOMHCND0deHoSpw1OCF7Vyhg3Q X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5709 On Sun, May 12, 2024 at 07:29:37PM -0700, Nicolin Chen wrote: > On Sun, May 12, 2024 at 10:26:44AM -0300, Jason Gunthorpe wrote: > > 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() ? > > With the level-3 allocator, something like the followings? > > level-0: iommufd_object_alloc() > level-1: __iommufd_object_alloc() > level-2: iommufd_object_alloc_elm() > level-3: __iommufd_object_alloc_elm() > > In this case, this patch will be: > "iommufd: Rename _iommufd_object_alloc to iommufd_object_alloc_elm" Yes Jason