Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp1079782lqs; Fri, 14 Jun 2024 14:29:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX0pXKOGO+gTVQTm4i+ZYUUAsq5u1cHkg6+Xs7DcAe3ZyFZRjfsKatYuYmtdgqYczc7P99YjTYANF+In0PDnQH08z0TOYh47Qn+r3yKwA== X-Google-Smtp-Source: AGHT+IEhgg4nWtetlEiVMF4VU1Dv6IzNRh6QUVQmLgFD2q3i/mUP4IsQLCxsof2l80nJTmo2QvvC X-Received: by 2002:a17:907:c24d:b0:a6f:6e7e:349b with SMTP id a640c23a62f3a-a6f6e7e3734mr109803666b.63.1718400587711; Fri, 14 Jun 2024 14:29:47 -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 a640c23a62f3a-a6f56d4b5d7si206898866b.227.2024.06.14.14.29.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 14:29:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-215497-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=@amd.com header.s=selector1 header.b=4c5BRCBk; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-215497-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215497-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.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 831CC1F22088 for ; Fri, 14 Jun 2024 21:29:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ED18B18308F; Fri, 14 Jun 2024 21:29:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="4c5BRCBk" Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2083.outbound.protection.outlook.com [40.107.220.83]) (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 BFFCD2F50 for ; Fri, 14 Jun 2024 21:29:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.83 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718400577; cv=fail; b=KxrXq1/BKnOGnFeppRLzOnK330CFZR0wKWgWo8zUFAZ5iyJqu+uCWdclXXfwiESdDLjku1T1ybkgnDoIfVu4VhswxbWMiOwVAyjUDA5ReXI4AnjA/9Un1qOgJpSZIH5/LnGvlgHIbaTCn3tfkFXado2km9uav3CSD3Qn3t4mHc4= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718400577; c=relaxed/simple; bh=LZnCDjr32c2VFBqAVzGPVrnLrotuoieROomGpGh0AEY=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=aGvmEyc+aACgrZkCR9VFwL/tm/SoCxV5fL+L3YsQMiqAHk7Tcs5Ldh3R14bX4aQKmpCkMdcopLqG9Sbnqw63dIGn7mcRDRRawTUmqmfzBSzo8GgP9XAaLpqtmsFCvUieE31VcVSBIT6/hmZYhTePRI3USnSOz6VpaJzTwSWJPcs= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=4c5BRCBk; arc=fail smtp.client-ip=40.107.220.83 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bihbk9Hg0uPfBiG/Tqu20p3g9i3ZQwCH/pmtIJhj+4VgPY0xPMnMKinLIC25Eu13tQyeHUKkckM9D+s+rXlmJWPLxBXe5y143ezRX/m8PrAz0vb9hX4mYmNQCPIOVcjYOdShLhPX3vWJZx0QBrfWVwonjhQXecHpDrYUB/qMkLsIyE5GsqutbCMyHPagJQoeDe9raHFeHoN3IzT8BFbYHhMOznZBtlRvNMolnSCWRiA/DNDzwqocK0RGNfTI3ZLB/599DllKgLUypLxGY7yXvFUNmEyM/jeupsNhugjDuu8S9nPvk1HmQ0qGo/X0k0qCD97WDWjeusLNF2MNOoUg/w== 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=Tx3xSoFc9PAm4vToiIG4Ce8Z4Q4ENcjPZ1fIePhVsgM=; b=Rg67ekuQAipQvZ8RhnPF5p2gMk6/bRQcEc0J0mwvXS9MUVXQa/m47ZkiqhnE8NLEa5Jqgz22qHf1rSptZwAz1u/rDlkZeK9KCKS1rpi663Zai6uwbmPQYx0hzE1DsRpsoqUCQ6du+7WWn/dONUZ9TAs+e7OjPB7mhG6aIjib2VRzrASiLRsnRFGAtHHTeRV4gomPf1COKjPgMW0968gNHKB+hSbm6/4TVtjKMhebro36SLgeIBcxi/sZ0p6qsrGcUTfKQuGpnu2LamGgCcLMCZBmcOfi4Lux4GmQtrf5EGyNlAnG4nGQQhSZWYiw1CIRdKZd1YfctZWqOOEG5A6M7g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Tx3xSoFc9PAm4vToiIG4Ce8Z4Q4ENcjPZ1fIePhVsgM=; b=4c5BRCBk9MZeJSdMHheoXDjTQmWnJTsRpwXDSaXkvovdJah8lfKvpeLhNF37TqYsmgFneIfR4vHlt7KwooJ+2kw7cKkBq4qn1FixRf/VdiQ2yFsdozpH2/Jl2j6egLEfBcOrWx2lIO7yQYdBiK/Jg8C4HFaAAVqyHPi+haRlBfk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from MW3PR12MB4553.namprd12.prod.outlook.com (2603:10b6:303:2c::19) by BY5PR12MB4067.namprd12.prod.outlook.com (2603:10b6:a03:212::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.25; Fri, 14 Jun 2024 21:29:33 +0000 Received: from MW3PR12MB4553.namprd12.prod.outlook.com ([fe80::b0ef:2936:fec1:3a87]) by MW3PR12MB4553.namprd12.prod.outlook.com ([fe80::b0ef:2936:fec1:3a87%5]) with mapi id 15.20.7633.037; Fri, 14 Jun 2024 21:29:33 +0000 Message-ID: Date: Fri, 14 Jun 2024 16:29:29 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Reply-To: babu.moger@amd.com Subject: Re: [PATCH v20 00/18] Add support for Sub-NUMA cluster (SNC) systems Content-Language: en-US To: Reinette Chatre , babu.moger@amd.com, Tony Luck , Fenghua Yu , Maciej Wieczor-Retman , Peter Newman , James Morse , Drew Fustini , Dave Martin Cc: x86@kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev References: <20240610183528.349198-1-tony.luck@intel.com> <658d9869-ef22-48a7-876a-5bbba4f134ff@amd.com> From: "Moger, Babu" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SA0PR11CA0006.namprd11.prod.outlook.com (2603:10b6:806:d3::11) To MW3PR12MB4553.namprd12.prod.outlook.com (2603:10b6:303:2c::19) 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: MW3PR12MB4553:EE_|BY5PR12MB4067:EE_ X-MS-Office365-Filtering-Correlation-Id: bc28d5a7-fa10-4366-bb33-08dc8cb91513 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|1800799021|366013|7416011|376011; X-Microsoft-Antispam-Message-Info: =?utf-8?B?TnZCek4zdEs2UUxTcDd3RzkyRDdML1RoNlBoR3Q5aGRUbE9NbUZEaGk4dVlJ?= =?utf-8?B?VXdCMXJ6cCtIS2pJSGE3cmF3OHZNVmJOSHk4NCt5SEk4Q2VUd0ZnRldLTDEx?= =?utf-8?B?ak91bHpFMEo1Qis0OWNTVXFoZjhFYXlQanRFdXNuUHJuS0ovMGdrUUVZMjds?= =?utf-8?B?TzFrSFFIUG1zUm5LbjJOc2w1QkZHRTU1YzR6K0g4YU1IQ1NMdGx1N3lTV3RS?= =?utf-8?B?cFBqNFB6Nk5VS0lVdEpIOGZKQlR0MDN5UHIrbkJPd01CMkVRTVk3V0FjdCsz?= =?utf-8?B?RXh4c0p5NWFjczRUOW05Ui9TZVFGMXV0U0hNQk1rbmlWZkI5blJ3aDVQL2I2?= =?utf-8?B?bXEyM0ZBR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?VWVhVk5mUjJUcHVhLzE5SDZiZjluME40MVZGS3VYWlBFOGVDa1B3enIxRFIw?= =?utf-8?B?VTkxSkVvYVU5MUE2aVNMUmxOS1ZJQTZtak1weHNXVmp1dGt4Wm1VdnNMcklh?= =?utf-8?B?U0FXNVNEdlBMcFdPT0lFdGpVK0xrMkNRMS9JK214a2Q3eFBocHNzWFBDM29r?= =?utf-8?B?aTdtMHBFbEFaZkNoQ1dKdk5PWXlWSDgzdVgyZk1PcWpobGZzOHVKWmdmbFYv?= =?utf-8?B?NGhPRTg5UENtYjNSUU9GWHJ2QUtRNW1raUhYVG00Vy84TG51c21aYnNTQWQ3?= =?utf-8?B?NmpIZ05jQnN0aDdPK0xZSEdGN0pUVW9WVU9WZW9ZcU9zb0hPNlVEaHc5WVR3?= =?utf-8?B?RUdFU0VPcCtSZHo3OEFySXpEeXU3aDljTUhlbXFlQUdLS00yeUJkaDY1QVdr?= =?utf-8?B?SnR6UmhmR0RmZW9FdTA3SFZxcis0czJ1MjQ1dUhaUGpSQ2o2aEUzekZBLzMy?= =?utf-8?Q?V38VG6t7b3N/Rk7kNh3TVxdhbTlJcKHIkV8uVMN?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW3PR12MB4553.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230037)(1800799021)(366013)(7416011)(376011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZlhoOXMzNy8xb2NTZCtkK0tOcnZYN1NYa20rQU1DeDZwSlZmL3N1ZFRHSytL?= =?utf-8?B?bGpXcUIxcTYvT0czWUJubDBzTzhRdEZ6OHlzdkpQNXRTTzJzVGtybWNmUkRy?= =?utf-8?B?YmFVellBaEhsOWFybkFyaExVT2FIMkhYMXlEbVpib04wdEFYV0ZOY2ZKenY0?= =?utf-8?B?MnkxS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FVM3A5bkJ5NGdTMytrY0dFaUZGZHAya2pKQkduM0Y5Mk1ONzFHRFJ1M0lN?= =?utf-8?B?UFhTcUhQbmlXcEt0YnJ0NVVobUlFWjNpN2N0YUtBcXZ3VnpBTTNLOXBlOVpI?= =?utf-8?Q?FJiXZTe7KSMC0xU14HCoxeJBv?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: bc28d5a7-fa10-4366-bb33-08dc8cb91513 X-MS-Exchange-CrossTenant-AuthSource: MW3PR12MB4553.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2024 21:29:33.1529 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: TkvPek3xxdLHt8Nrk6B2cy2zJ5pO7NftGevUJdBgGNMeTTQvYfic1v6k8LmiMUsG X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4067 Hi Reinette, On 6/14/2024 11:46 AM, Reinette Chatre wrote: > Hi Babu, > > On 6/14/24 9:27 AM, Moger, Babu wrote: >> Hi Reinette, >> >> On 6/13/24 15:32, Reinette Chatre wrote: >>> Hi Babu, >>> >>> On 6/13/24 12:17 PM, Moger, Babu wrote: >>>> I may be little bit out of sync here. Also, sorry to come back late >>>> in the >>>> series. >>>> >>>> Looking at the series again, I see this approach adds lots of code. >>>> Look at this structure. >>>> >>>> >>>> @@ -187,10 +196,12 @@ struct rdt_resource { >>>>        bool            alloc_capable; >>>>        bool            mon_capable; >>>>        int            num_rmid; >>>> -    enum resctrl_scope    scope; >>>> +    enum resctrl_scope    ctrl_scope; >>>> +    enum resctrl_scope    mon_scope; >>>>        struct resctrl_cache    cache; >>>>        struct resctrl_membw    membw; >>>> -    struct list_head    domains; >>>> +    struct list_head    ctrl_domains; >>>> +    struct list_head    mon_domains; >>>>        char            *name; >>>>        int            data_width; >>>>        u32            default_ctrl; >>>> >>>> There are two scope fields. >>>> There are two domains fields. >>>> >>>> These are very confusing and very hard to maintain. Also, I am not >>>> sure if >>>> these fields are useful for anything other than SNC feature. This >>>> approach >>>> adds quite a bit of code for no specific advantage. >>>> >>>> Why don't we just split the RDT_RESOURCE_L3 resource >>>> into separate resources, one for control, one for monitoring. >>>> We already have "control" only resources (MBA, SMBA, L2). Lets >>>> create new >>>> "monitor" only resource. I feel it will be much cleaner approach. >>>> >>>> Tony has already tried that approach and showed that it is much >>>> simpler. >>>> >>>> v15-RFC : >>>> https://lore.kernel.org/lkml/20240130222034.37181-1-tony.luck@intel.com/ >>>> >>>> >>>> What do you think? >>>> >>> >>> Some highlights of my thoughts in response to that series, but the whole >>> thread >>> may be of interest to you: >>> https://lore.kernel.org/lkml/78c88c6d-2e8d-42d1-a6f2-1c5ac38fb258@intel.com/ >>> >>> https://lore.kernel.org/lkml/59944211-d34a-4ba3-a1de-095822c0b3f0@intel.com/ >>> >>> >> >> Went through the thread, in summary: >> >> The main concerns are related to duplication of code and data structures. >> >> The solutions are >> >> a) Split the domains. >> This is what this series is doing now. This creates members like >> ctrl_scope, mon_scope, ctrl_domains etc.. These fields are added to all >> the resources (MBA, SMBA and L2). Then there is additional domain header. >> >> >> b) Split the resource. >>    Split RDT_RESOURCE_L3 into two, one for "monitor" and one for >> "control". >>    There will be one domain structure for "monitor" and  one for >> "control" >> >> Both these approaches have code and data duplication. So, there is no >> difference that way. > > Could you please elaborate where code and data duplication of (a) is? We have ctrl_scope, mon_scope, ctrl_domains. mon_domains. Only one resource, RDT_RESOURCE_L3 is going to use these fields. Rest of the resources don't need these fields. But these fields are part of all the resources. I am not too worried about the size of the patch. But, I don't foresee these fields will be used anytime soon in these resources(MBA. L3. SMBA). Why add it now? In future we may have to cleanup all these anyways. > >> >> But complexity wise, approach (a) adds quite bit of complexity. >> Doesn't it? > > "complex" is a subjective term. Could you please elaborate what is complex > about this? Is your concern about the size of the patch? To me that is > not a concern when considering the end result of how the resctrl structures > are organized. > >> >> For me, solution (b) looks simple and easy. Eventually, we may have to >> restructure these data structures anyways. I feel it is the right >> direction. >> > > I understand that it is tempting to look for smallest patch possible but we > really need to ensure that any work integrates well into resctrl. Doing > so may end up with larger patches but in the end it makes the data > structures > and code easier to understand. I specifically find the duplication of > structures > troublesome since that requires developers to always be on high alert of > what code is being worked on and what flows the particular code > participates in > since the duplication results in members of structures be invalid based > on which > code flow is used. To me this is an unnecessary burden on developers and > against > your original goal of making resctrl easier to maintain. > > Reinette -- - Babu Moger