Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp1135314rdb; Fri, 9 Feb 2024 11:16:23 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU3U2M01AnmOAkGhEzE+DuursKtFuMb5RfDiiENx7sIVF6rEE9Hjkr0t4VkWp4FiGNpfSYZgZ1Zt9zcup74NrFxNtAZixVHqbcTV1nuIA== X-Google-Smtp-Source: AGHT+IEtEIhiUajHAznb9pR+T0VzLMu28MMjIrpLXQ2JODfXAHKSybqtkM/jMTRDLudXavgfyG/N X-Received: by 2002:ac2:5626:0:b0:510:1013:c67f with SMTP id b6-20020ac25626000000b005101013c67fmr1888545lff.67.1707506183276; Fri, 09 Feb 2024 11:16:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707506183; cv=pass; d=google.com; s=arc-20160816; b=bTeRqjSLCQQke6zCg2C25ziiC3yZSeeSMq2wkyGr4+ZOhI+r8VVql1aVE9BiZmEjmO 4wHt14epmKt7alczOBKrlx/wVw2iNdqJQclInNp1l4ZdBVd07hfyHP9yj0q8wO3uYoVD JtLNTeTWTAFqSxxODKBJMYbbxJXGtfexlskVPPszb0wO2DlK/Npruyo1k4OXbxrIYUZd PnA4U7ZNLjibcIBmePcrwOyIyN1E5NGQcIqMXDCnxhHhx/tqDeSosm+4dNAxpEzVfMTC RnI/w5SKenTY9ZswSKscTKowvj+zb/J5zPCEwMNyj9MpW4VIz33ekhnFtHNuPJyxvyX0 pTpg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=D4E2TXU6BGiIqWH84bZT1HJLPDQxOvN+/n0uO0qrjTc=; fh=7FxZrfBW4rjX146ifRGXtGGwCSnpPz+IDXsTNlSQ6Xo=; b=qEbkeswdOMOQkd41l5tC1z5OBYZOWTUM2FVxLkf5cw/leKSuG6Ijv7BmL0PmjYXxz+ xM13c1gMdYLaOG43j893jVDDdD89F0eWMFlRLK6byeI0rUs7TDSeUfkjLXzdnQSI3bzq G4fsvEQMmUvg4c1mOUqyj2cMdXM52YbSUr6b/ldHBXJzo7AgNoPqprNaFESjJSgoowCd qmJK7je2He++bJWGGm5zyXX67bABeKnwGxv9Si+6Glb6cbX28JXRWVNN8NGAzc5MlwEV Qs/Ud3Xt++sBP5w9azjLu+sMdfgiY9Yc+qGco+CUsUETn0rVahZrY7IbhYM7DlQpejDx XrhQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Dou+h7Xa; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-59859-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59859-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCX1f9S6sDOPwbVOnf6t0ujf/dEDVGjg1CGVdLx5X17o2dnowMQZuTOmf96os3ueQq8modMEHTWpo+yG4XozoCXsnSkB2qgU6Kpwvpelmg== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id h20-20020a170906261400b00a34a303509fsi1113645ejc.990.2024.02.09.11.16.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 11:16:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59859-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Dou+h7Xa; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-59859-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59859-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (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 am.mirrors.kernel.org (Postfix) with ESMTPS id F09131F290A0 for ; Fri, 9 Feb 2024 19:06:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BA35386ADE; Fri, 9 Feb 2024 19:06:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Dou+h7Xa" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (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 1960384A3F; Fri, 9 Feb 2024 19:06:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.21 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707505569; cv=none; b=jqsBduOePoAbT1HQt/+kFB822UhG4OkDEb9uRikrGWF8MMRxQ9g5kG1XgqLlkLVrpgG+/ulXzqhOaQfNEgTrNRLmh5c5sFpEtToF94vyCZZiUVb/rqtBW/bLSkc50ebEIVX9QZqS+3KoHrKpPI7jvapPn47eIq8Wq/g6yG3Ak7U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707505569; c=relaxed/simple; bh=bIcHkUcTe01Z5+BZ75l+ELTY5lq3c2PvPuqRwnGgQCE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OVa3vadgQZ4mXrioGhm/4R88GeaAOLSg19DYuGkWgN1Xm9nwh6nwzoPv0rWmoNv5OtpY5bs9iwyj3xVF/ho090gqNkFciqssBN4FgwxpMVfO0HNXWBSIW7PucV85J2lUbfB70u08U4zPSTjoT091JrBXwmKKvNW/ezwQfk1puFo= ARC-Authentication-Results:i=1; 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=Dou+h7Xa; arc=none smtp.client-ip=198.175.65.21 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=1707505567; x=1739041567; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=bIcHkUcTe01Z5+BZ75l+ELTY5lq3c2PvPuqRwnGgQCE=; b=Dou+h7XaUfVq85I8jvsINrBxFTjTtn3dBxHZ9UtmYu6ZUODOvXgiK5Ag 7845lbCm/pJTuq9l5RUQZuP/34xICs9d5QmE1zk6wjSQ+fvB0rcdDNy1k EvgSealaP9zhE7DYvD7UwqCnOa4RyjK/IwRIyXCLIuwfzcHm5F8sMYfbJ oZy4kJmXc9G02teg0r1gNwPQEXc/PKaYbOikzQ6PjwmwpmsrRZsbmoiA8 7ypyMCrXxkCIXx21b0CrYnxwKQVZjDyaq2cVx8v9uHIyzJPNRs3Cg7dA4 Se+xWq+bcqA1rR5UfdrXeVVsx9jT4ThW59khtcZGIGnzbuN1OY1USAy2y w==; X-IronPort-AV: E=McAfee;i="6600,9927,10979"; a="1392489" X-IronPort-AV: E=Sophos;i="6.05,257,1701158400"; d="scan'208";a="1392489" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2024 11:06:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,257,1701158400"; d="scan'208";a="6661661" Received: from agluck-desk3.sc.intel.com (HELO agluck-desk3) ([172.25.222.74]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2024 11:06:05 -0800 Date: Fri, 9 Feb 2024 11:06:05 -0800 From: Tony Luck To: "Moger, Babu" Cc: Fenghua Yu , Reinette Chatre , Peter Newman , Jonathan Corbet , Shuah Khan , x86@kernel.org, Shaopeng Tan , James Morse , Jamie Iles , Randy Dunlap , Drew Fustini , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, patches@lists.linux.dev Subject: Re: [PATCH v15-RFC 4/8] x86/resctrl: Add helper function to look up domain_id from scope Message-ID: References: <20240126223837.21835-1-tony.luck@intel.com> <20240130222034.37181-1-tony.luck@intel.com> <20240130222034.37181-5-tony.luck@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Feb 09, 2024 at 09:28:52AM -0600, Moger, Babu wrote: > > + if (id < 0) { > > + pr_warn_once("Can't find domain id for CPU:%d scope:%d for resource %s\n", > > + cpu, r->scope, r->name); > > Will it be good to move pr_warn_once inside get_domain_id_from_scope > instead of repeating during every call? Yes. Will move from here to get_domain_id_from_scope(). > > + if (id < 0) { > > + pr_warn_once("Can't find domain id for CPU:%d scope:%d for resource %s\n", > > + cpu, r->scope, r->name); > > Same comment as above. Will it be good to move pr_warn_once inside > get_domain_id_from_scope ? Moved this one too. Thanks -Tony