Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp973352lqe; Sun, 7 Apr 2024 12:21:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVrtdAexQxZ2zPEU57ydkiiuHu2x/7S7j5x+XCadhNrI09tfji5CcZYoWDFIOR4kgembaR79YQsPnvvhl1IxESL94CYdh2DowySTe280A== X-Google-Smtp-Source: AGHT+IHbU8Uml8zOmQN1+PDGemwhJdNdR5suk0wOXcAD5dI7qtDT5gqvG3+8J9Ck4ZGCnbZO06bn X-Received: by 2002:a05:6870:1110:b0:22e:d092:288 with SMTP id 16-20020a056870111000b0022ed0920288mr6989578oaf.29.1712517697896; Sun, 07 Apr 2024 12:21:37 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id b2-20020aa78702000000b006e6499d9bddsi4876476pfo.373.2024.04.07.12.21.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Apr 2024 12:21:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-134625-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=ihArqXVb; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-134625-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-134625-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 4505C282067 for ; Sun, 7 Apr 2024 19:21:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 637DF3D55B; Sun, 7 Apr 2024 19:21:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ihArqXVb" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) (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 90CF639FF3 for ; Sun, 7 Apr 2024 19:21:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=192.198.163.15 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712517691; cv=fail; b=U7TTnJ6PRu6HWCQyRzGmEGLyYVYotSwby+3BkLu5GDO9ngvXnnvLmAT2okGQxDibgbAJC6oipITpvJSrN45weWx7rwwm78/5+W+i50zD2UOOqTcHwnHWFWJ54tLn7X6xNgxp+DMex5xKdrycPLCMcPuN1Expbgs71SaVZPyneCA= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712517691; c=relaxed/simple; bh=9//U4G35v6e561UW5ZerFOFUS7ecnea+OMQjnbS4e2k=; h=Message-ID:Date:Subject:To:CC:References:From:In-Reply-To: Content-Type:MIME-Version; b=Jg2vnKBmeX3r3gJDkq0RNDzSUOiXQcxSWAYzEc4+rEpOYUb3LM25+YTdzVkX2dT+yjqdA7PToTeqL0kocQabwgs2qKgg+eUnPpp9uZ7ueBqK2BG3BCYfFaTi7qiAstziRtXQPEQq88B2CM71WTOGynw7XEhQ0EFVGgsqcRVL8Fk= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=ihArqXVb; arc=fail smtp.client-ip=192.198.163.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712517689; x=1744053689; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=9//U4G35v6e561UW5ZerFOFUS7ecnea+OMQjnbS4e2k=; b=ihArqXVbEvpfE4SeUddQXWKyBC4bXU7MCf/YbS7V7ARo/3FoXBGQSSGv hx/vTdubODOIyKEvYRMUXsNRWehSPjQgNc6X9yMU81INnWmIqnINd2ckZ TH41EFMkiwpR+9+angLz7iPULMxf0mxNNNV2RD2JV+ysqZ/MNnYp89IsG XwwqeoH3YDlBJ90zma96CGl2NP8LTOqSkMTL5vObcB3Wv/vnZehX7sWXc Z4KNg+UKr5XujMMUC3nfodeqVCWSO3PzDcttLDTuXgN/RMyZ+mPm5zKAj laf95scix+DujcUDS4R4iDcOMQclLC3pT9hwC6wgB0mwHDcuSnyKDioXN A==; X-CSE-ConnectionGUID: UdfUv2G2S9eZBhVVNg/K+w== X-CSE-MsgGUID: Cx3QHk54S3WRZZ0Egny8RQ== X-IronPort-AV: E=McAfee;i="6600,9927,11037"; a="7971883" X-IronPort-AV: E=Sophos;i="6.07,185,1708416000"; d="scan'208";a="7971883" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2024 12:21:29 -0700 X-CSE-ConnectionGUID: qmboIkFcQZ6928/dN3J9Rg== X-CSE-MsgGUID: DpyaF2rcTDyzeu4BzzFE4A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,185,1708416000"; d="scan'208";a="19795370" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmviesa008.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 07 Apr 2024 12:21:28 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Sun, 7 Apr 2024 12:21:27 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Sun, 7 Apr 2024 12:21:27 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Sun, 7 Apr 2024 12:21:27 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.101) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Sun, 7 Apr 2024 12:21:27 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z0/Y4LOtt4nj9/IoWMbV8ECZjZTP1wEVg92gGosv+Ta8+Qy4BVcNIedX1VCfbIIBLxn3cqDaGNl9pHXoE1zTjU6FX2GmtLwiAHJaItDkSAUH+/v83KC0Hftl8lvZoT/3DCpS7CLduxyguLlnTCyU7605er92xaorZ/zMk9f6yAilkOs42BYNGefnzLuHB9GOEb594COO5fWnlqvJotN/diIHA4XOjWUXe5B/AXjA4NEMp7xH9vTzcwV5ddeD7yvXAlU/c2Xirfqi5NIR+hyJGzo04emCVVBG+5sdMbW+G7sZJQ0Abj5oTtFlx8bBDd6vNo/bdojtMNfSjy06kEwoCg== 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=qm6BtAe7EZvYvEy69sBID/oukxko9O4aIkrpeP/PxUU=; b=e0AdZXLeaoRDsDspfu5NcLZ9adWLMzXldC2m/zCvD1smGbD7b6/S+zbAV18uk9AQYvmofL0AQNX9CeNTdpmwefMaXJFp78Eezvo7hBfTmq3scFahG67Dv44oJyzOXgmKen2DqB0MnCgAa902xk5qsaDcrrFaYUVwmDbrkhoOO6zn/CIdjiXr4kpxy3yNZLtHMtwbP4SxmRbfKMpaK0SgMdNepiwsb/c44Y8T9MikCV6Fps51sFwBr7qnlraeTdCjhDeK+VQ74LsLXjLOIRiGrB78sd3NuWkHdwAmZk67dSSAln2evYzGDPmBVsVPKkySX7rqWdKDzI1kpPSHGSewlQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from SJ2PR11MB7573.namprd11.prod.outlook.com (2603:10b6:a03:4d2::10) by MN2PR11MB4743.namprd11.prod.outlook.com (2603:10b6:208:260::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.26; Sun, 7 Apr 2024 19:21:23 +0000 Received: from SJ2PR11MB7573.namprd11.prod.outlook.com ([fe80::d610:9c43:6085:9e68]) by SJ2PR11MB7573.namprd11.prod.outlook.com ([fe80::d610:9c43:6085:9e68%7]) with mapi id 15.20.7452.019; Sun, 7 Apr 2024 19:21:21 +0000 Message-ID: Date: Sun, 7 Apr 2024 12:21:17 -0700 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 1/6] x86/resctrl: Move __resctrl_sched_in() out-of-line To: Peter Newman CC: Fenghua Yu , James Morse , Stephane Eranian , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , , "H. Peter Anvin" , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , "Valentin Schneider" , Uros Bizjak , "Mike Rapoport" , "Kirill A. Shutemov" , Rick Edgecombe , Xin Li , Babu Moger , Shaopeng Tan , "Maciej Wieczor-Retman" , Jens Axboe , Christian Brauner , Oleg Nesterov , Andrew Morton , Tycho Andersen , Nicholas Piggin , Beau Belgrave , "Matthew Wilcox (Oracle)" , References: <20240325172707.73966-1-peternewman@google.com> <20240325172707.73966-2-peternewman@google.com> Content-Language: en-US From: Reinette Chatre In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-ClientProxiedBy: MW4P221CA0022.NAMP221.PROD.OUTLOOK.COM (2603:10b6:303:8b::27) To SJ2PR11MB7573.namprd11.prod.outlook.com (2603:10b6:a03:4d2::10) 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: SJ2PR11MB7573:EE_|MN2PR11MB4743:EE_ X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dPZPeLM1dSh/d6ekXwZf2s2JHco/IV5q3/I46WZPIpQSlDkYV+DJT2nxPcVDhK9hMoDJc8R0EJ+BQqobo7rUljrtK1fW/wItlpifAj8dxEH9Pba+DhxJ5hmpSk7A9pU3moXPInbVLDb6yHmydsj8Vx7VT8m3I9/BCDDMXgOgb7KNN0dxv4PEnDMRenzoEBzSfNjpfzsQLd3LVOSth/AxANzgjuuPW6/F8Yb4SRgDlVvPkAzAAZ9YAJmqhrUQO5ghkXTvtnz0ugwlHL0mdYvr6mmCztLekiJOIxjGXeIeqqz+/mnxhAJgCjupTkAAGD9agRZFIVwLzLaeeOfwVst/c56B/bAXwln1tBHL8IhY7KjWVEddhxgIzPVvF9nafPe481+XqoaTPigVQeY3CYuDvrdC/2ofbwSQTowbfiKZ3BZKO2A4cB9l8iXps8RZP5L6me9mOiGbtWhxe4khKi2z16wBOyV7y6Ok1LPoNvkaNRM8IrYjB7ED52v4oeLEh8NghwJf9lg4hZ2cjml5nzP+imo76Z7Ns+odWnHqcpvRbBLhMDS97tjr7ac+2QEAvZjMP2JrDFw4GzR0E4RqzqsjFcbm643RzTXqVMwWV4HVqRESSiCtbAY6IVv1GTRXOF0upEyse3MzfOvcAh7fq6jIRkK748dfB5pkyGCjC8tbRps= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ2PR11MB7573.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(1800799015)(7416005)(376005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?WUlOSVNMM3pvbTA1WFBickpVU2hUTTVUQWFpNHUyT3hiMys3RWFObEFmcWl6?= =?utf-8?B?UDlEYmNJa0htQXVnMlhjNVQ2OWt4TUNyRmcxbC9jeWxKL2FBaWV1a0VaOCtX?= =?utf-8?B?b3ZXZHhlcGs3TC82dlJmbk5rNHFRUloyREJvRlBKYlkzbExUK2REVjhVLzY2?= =?utf-8?B?ajVRNFpYMEZRZ0ExdmZlYkxYSVpSYlVGRmVYcGV4SW1paStHNncvYi9lSi9Q?= =?utf-8?B?UDFNRmM3VjM2d2g2TmxZOFUrNk5FL3dvanQwRTkwbnAxSzVZK0VmT1Z5Sm9J?= =?utf-8?B?enlINDRQQXdBazZiWXNXdHBQZU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KTmE3bzlPdUs0bnhBYTBn?= =?utf-8?B?Nm0rdmE2a0cwbzNZR1J4M1pjTm5tczBmeXNoNjRjTWJuOW5KYys2M2RZeDgy?= =?utf-8?B?bUE9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 3c160191-9acc-4dfd-b09f-08dc5737e83c X-MS-Exchange-CrossTenant-AuthSource: SJ2PR11MB7573.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2024 19:21:21.2381 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: MA75pkX5NaHmalENePxzBKWE7+2o//UnzGeXczdkigxKuxE5z8PDDUk/h9hQb92gsHUblfOUMHm97s8WCuCOz2cXdKSmtctfK/DkNPsnwv0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4743 X-OriginatorOrg: intel.com Hi Peter, On 4/5/2024 3:04 PM, Peter Newman wrote: > Hi Reinette, > > On Thu, Apr 4, 2024 at 4:09 PM Reinette Chatre > wrote: >> >> Hi Peter, >> >> On 3/25/2024 10:27 AM, Peter Newman wrote: >>> __resctrl_sched_in() is unable to dereference a struct rdtgroup pointer >>> when defined inline because rdtgroup is a private structure defined in >>> internal.h. >> >> Being inline has nothing to do with whether it can reference a struct rdtgroup >> pointer, no? > > No, but it has a lot to do with whether it can de-reference a struct > rdtgroup pointer in order to obtain a CLOSID or RMID, as doing so > would pull the definitions for struct rdtgroup and struct mongroup > into an external header. Before doing so, I would want to make sure > implementing __resctrl_sched_in() inline is actually adding value. I expect that each architecture would need architecture specific task switching code and by pointing to rdtgroup from the task_struct every architecture would need to know how to reach the CLOSID/RMID within. Having architectures reach into the private fs data is not ideal so we should consider to make just a portion of rdtgroup information required to support switching code accessible to the architectures, not the entire rdtgroup and mongroup structures. .. >>> +static inline void resctrl_sched_in(struct task_struct *tsk) >>> +{ >>> +#ifdef CONFIG_X86_CPU_RESCTRL >>> + if (static_branch_likely(&rdt_enable_key)) >>> + __resctrl_sched_in(tsk); >>> +#endif >>> +} >>> + >> >> include/linux/resctrl.h should rather be divided to accommodate code >> as below: >> >> #ifdef CONFIG_X86_CPU_RESCTRL >> >> static inline void resctrl_sched_in(struct task_struct *tsk) >> { >> if (static_branch_likely(&rdt_enable_key)) >> __resctrl_sched_in(tsk); >> } >> >> #else >> >> static inline void resctrl_sched_in(struct task_struct *tsk) {} >> >> #endif >> >> so that core code does not get anything unnecessary when CONFIG_X86_CPU_RESCTRL >> is not set. > > Will do. I think this needs more thought. rdt_enable_key is x86 specific now and should not be in the fs code. Every architecture will have its own task switch code, with __resctrl_sched_in() belonging to x86 and thus not something to be directly called from the fs code. Reinette