[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: Jan Beulich <jbeulich@xxxxxxxx>
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Thu, 30 Mar 2023 12:19:49 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=Mm5t9wd6Q4AXf+Rr1d85/7NCmxjC6c/bdnbGO4RKlMA=; b=Tqkw8OExOV7O4F8kTav+NCzterd84lgaJCBuA+Wz5TEdk81kSRS+qugu6Bo6TKZewZZBsbH0FQRADX9ebwAwFxkltyT3mCyW5Xro6HlEMRuXGwQN8Y+2Kz3c9GDaUcaZMjbCdktVHgProwy0puEJqYSzZ8KHJ23Gm/TrFdZCyqg9kZnWrkab/izgejxmzdy/NQb3GvTdgUhN13tYVRGLk9UZB2LI1+Fa1BlYYYLMOMEHKB2REQKA24vPgcwpuh7HzuBnYpMWxThUR7E/03hQ9JTLAA/7lotdF6u4KJUdMpWK0k//SE3z9AUGZyYH3mExSc9R+jKf4F7KLXOskkAjCg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z+y+oHCJxnzP6VyWkUjSQ1NdZ+1cnSJEqJAzO1UT8VXExyDrpOvvflmpqu0ewjayY57NiCLXDEPWZar3o/eFhEdDTYVQfE12BktXuTbLafge6RU8qjJZMvYNbbPyCCEekSVSkpkC3Si3dvh+nL6Yo7v1BwAJEz45DYEzlpm07Nb87IONNHCOgm6BO3AevE8WdmExuP8dq7uZwmIUW38FHwBIcZeDWpMYhIBRF/CqkgHjbd/ZZwDyvmsVynbjJAV+iZcJlfNLuLNBK/yxBrRV1LDS5aPs706LJFcUxwvnHoOdMi/Qyd4eoQJDvQSHEejktu8z7BwdKP1PevmrPZN7nA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Thu, 30 Mar 2023 11:20:20 +0000
- Ironport-data: A9a23:epFhs6KOy80udt/MFE+R/JQlxSXFcZb7ZxGr2PjKsXjdYENShjRVy TYeXm3SaPuDZDbzftt2a4XnoU4DsZKEn4JjTgJlqX01Q3x08seUXt7xwmUcnc+xBpaaEB84t ZV2hv3odp1coqr0/0/1WlTZhSAgk/rOHvykU7Ss1hlZHWdMUD0mhQ9oh9k3i4tphcnRKw6Ws Jb5rta31GWNglaYCUpJrfPTwP9TlK6q4mhA5QdmPakjUGL2zBH5MrpOfcldEFOgKmVkNrbSb /rOyri/4lTY838FYj9yuu+mGqGiaue60Tmm0hK6aYD76vRxjnVaPpIAHOgdcS9qZwChxLid/ jnvWauYEm/FNoWU8AgUvoIx/ytWZcWq85efSZSzXFD6I+QrvBIAzt03ZHzaM7H09c5qClpE5 fYIGApKSTuHg7y165XrUdlF05FLwMnDZOvzu1lG5BSAV7MMZ8CGRK/Ho9hFwD03m8ZCW+7EY NYUYiZuaxKGZABTPlAQC9Q1m+LAanvXKmUE7g7K4/dqpTGNnWSd05C0WDbRUvWMSd9YgQCzo WXe8n6iKhobKMae2XyO9XfEaurnxHugBd1DTezhnhJsqEOey2VODgFPbGqYgMW4mBW0S/hBJ kNBr0LCqoB3riRHVOLVXRe1vXqFtR40QMdLHqsx7wTl4rXQyxaUAC4DVDEpQMwrsoo6SCIn0 neNnsj1Hnp/vbuNU3Wf+7yI6zSoNkAowXQqYCYFSU4P5YnlqYRq1BbXFI89Qeiyk8H/Hiz2z 3aSti8iir4PjMkNkaKm4VTAhDHqrZ/MJuIo2jjqsquexlsRTOaYi0aAsDA3Md4owF6lc2S8
- Ironport-hdrordr: A9a23:ZzJnM6DGURHl3BrlHemb55DYdb4zR+YMi2TDpHoBMyC9E/bo7v xG+c5w6faaskd0ZJhNo6HiBEDiewK7yXcW2/h3AV7KZmCP0wuVxelZjLcKqAeQfhEWg9Qtrp uIHZIOauEYzmIXsS852mSF+hobr+VviJrY/ds2Bk0CcT1X
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 30/03/2023 10:40 am, Jan Beulich wrote:
> 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)?
Hmm yeah - I should reword to make it clearer that this is returning to
how it was before the series.
> Also do you mean "halve" in place of "half"?
Yes.
>
>> @@ -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 *?
Will do.
~Andrew
|