[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 5/9] x86: Merge the system {cpuid,msr} policy objects


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 30 Mar 2023 11:40:42 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • 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=7FOF5IBTMudRrcIzMtKWAZCD5AeZFopY8mfnMr1WqLg=; b=ZD+Uw/emS5lRJhglhlydKOH580fWUWKFBSxcy44IjnhFRwt8K/PL4Nbz129uqJK0AAHSJj1ckzIxbrhZ4rArmY7NSxfkOUQy+i5Xx2kMR8ldZuFJJAP42ggSvcF4Qh4Cd5xoBGxUFnGNEHdVUNYJZ7Yfjf4LjJAKKYOkVqvRGl9aal4wnS+6ilgQ0uRzatnerXEToaIC537Hs5dKdn7JkRJeum7CuT5+oUJ0zC8W7sAqLfE/NsOiKkHTEi+q2EHPeavz+vc0TajsT4Jia2O+7gPT4vR4AH+eGE5qUvkZzKUY48+Nk6VLGm/6nPjw7vFieIFSxAOddFtFaP5ZKW0Wtg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eQuUzydJfZZJ2N4/ThDd4SxSZNI0LSphUg5YBp1SzrfbCmIQFrhcrSvTE4jG/hWGebMVBaSadY/IjxOlcIJHsBuISk/y7xf5tSvf3yQY/QD/oiRBf2ohAAx31K8h8TbVFITE4biOnu+t7xgZb2EJ0yjY6V8zhcv7kyc/huwnjjWtFHm8Q2WzOADYNgp5YCcp/HlHXsVmpCPzoNYzBwNmsr2RmLvTlJLJzAXYFE8I8Rl4PyLtSlxFb+lHA2UY6O/TkzgfhOmp64dMzDlKi97upY12f8Y4+3d+dF81kqJ2SbIRIN9bOGtIx8oiRr32vnt9/SQ5dvTqYBBGqoPSHvJO/w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 30 Mar 2023 09:40:54 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 29.03.2023 22:51, Andrew Cooper wrote:
> Right now, they're the same underlying type, containing disjoint information.
> 
> Introduce a new cpu-policy.{h,c} to be the new location for all policy
> handling logic.  Place the combined objects in __ro_after_init, which has
> appeared since the original logic was written.
> 
> As we're trying to phase out the use of struct old_cpu_policy entirely, rework
> update_domain_cpu_policy() to not pointer-chase through system_policies[].
> 
> This in turn allows system_policies[] in sysctl.c to become static and reduced
> in scope to XEN_SYSCTL_get_cpu_policy.
> 
> No practical change, but we do half the amount of compile time space required
> for the system policies, which saves 6x almost-2k at the moment.

But what you save here is only what was introduced earlier in the series,
if I'm not mistaken (just like the "containing disjoint" further up)? Also 
do you mean "halve" in place of "half"?

> @@ -391,7 +360,19 @@ long arch_do_sysctl(
>  
>      case XEN_SYSCTL_get_cpu_policy:
>      {
> -        const struct old_cpu_policy *policy;
> +        static const struct cpu_policy *system_policies[6] = {

Another const wanted here after *?

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.