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

Re: [PATCH 2/3] x86/cpufreq: Rework APERF/MPERF handling


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 15 Nov 2021 12:23:03 +0100
  • 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=Kk2fNYQ9zKHxy3KExTDoF9x8vrUJlbt+lcTc1fthxKo=; b=cGcpCkbGl/c+m9uHy7S3BS7bfK3ArZnUWqhAzdILd2KfKYAGFk97KOMBiVn1E7J5xLlTVPVQgBPlEucv0iIKFFjD7PR2rNduA3OBITK2y/7HmLbKduBgOxP62sCmLH4heyuILuUzrhkI+q1KxGafQODsucBKaO5XwfupQzw6KhAtrtBOMjIY6+eTQ53bKiGd4N1v3MmUxdrZ9EpMWrJDCHPjX3sMqf/c97TdiF9ZlhqvpE6I21iQsRZYNtgtkpPWE22pluCUEbPmV6J1pkmwd/f3lehtNXTVwAsXtAvT42kznK1s53gNZG27JVLbk/Mhj1yxYrmZyicA2ypzhJ9u2Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DcnxFBMEj1iAESsw7IwqgUeVqiSmh8APDvAuvCQsConYNE07Qu/kWp2Uy/Jw7PQeAb39SZbxB/3mvPtRZCPTyjTKFV7Np2mf2mrS9NdF2aC3f/lAqvMJeob3nCxUWO96hdkKGXKuIlJ+WanAkQlLzlGIeLm4E6Hdem8SfW9NlST6q7MrpqxcMIE+B/LoYL7xyQ0oGnsmiqZ7tgdpaoBr0UiQXKckL3BdIQWfbc7RYys9GiiEGH2EJqGqT0qYQU6VGdLMLK2h9ovny36Z3ZdC7jrF9l6Py3Ztzm31C7EWbOOB+WliaD1gQpJP4gxiG9/ANb8ZEgxH1rP5dcgj4HvjcA==
  • 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: Mon, 15 Nov 2021 11:23:08 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 12.11.2021 19:28, Andrew Cooper wrote:
> Currently, each feature_detect() (called on CPU add) hook for both cpufreq
> drivers duplicates cpu_has_aperfmperf in a per-cpu datastructure, and edits
> cpufreq_driver.getavg to point at get_measured_perf().
> 
> As all parts of this are vendor-neutral, drop the function pointer and
> duplicated boolean, and call get_measured_perf() directly.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> ---
> CC: Jan Beulich <JBeulich@xxxxxxxx>
> CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> CC: Wei Liu <wl@xxxxxxx>
> 
> Slightly RFC.  This does introduce an arch-specific call into a nominally
> arch-neutral driver, but struct cpufreq_policy already had x86-specifics in it
> so this is apparently ok.

That's fine for the time being; disentangling for another arch to use the
driver would be quite a bit of work anyway.

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan




 


Rackspace

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