[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 2/4] x86/APIC: calibrate against platform timer when possible
- To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Tue, 15 Mar 2022 11:39:29 +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=LOlg7nswpJcal2tuosNigguHrBNlq57YL/eqSdJKXXQ=; b=QFHkYMS4J/bMgNHRJpONv7PCye4sCSNp+epL5NBne66w+69UfGvKv98OtpsRzmAv6TKSTbbJkgk3mvNU4cbJID2kyZgKPOicmqmudQH52wzGtxh1shYB59X6ITBi11cDxCtd5RuZn1qxbNUhth/MqlalfcGvTjfW3dyuv5m7/oCcxRaNAgPNhxDAGmAAxNg8448/HjHshn8ReQP5Fm3ILKxfP9BQHFVjMr/pzI18InGoDJ8SBSYcBwJVoHJ/MBHULPZmwg6O+J88H35eWcXYjxTSsZYpU3DW0yqWIOqJNJUYGfvNX2wcQVpcyWgcW7LjjBzjqcRyBYoqJ2vNJKt9HQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ct8ghhXl71XkpH6qQlUQumSOlALqOMrXy9HGUp9E/nZ8wL3Aoj34pKxmKaS1uOmomub92kQUfuCxSycSvAR7OxkqLkMU+kdSFrtro9auAUn+dbCcl18bYd8zD3JbXlTiIXMZz2vmuQ4kvK9duLksal/dlsT0AupUuYqDOvg1hZVhgFij6oeLCeRPIKGTMGLvozbdO11j0J/3roFX9GWew+9W7m/GZRU6VT+Eq+tqCPLrL20LQIx+fSwDtJKVnSKh5Os5+KeQDuSpkbKk+2Qph5GVpGpQ4o0vlWuLGkGQm3vjjUpzHMdduljtmru8BGpntRw/4q9aqjY9WkbL3Ptjsg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Tue, 15 Mar 2022 10:39:45 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 15.03.2022 10:12, Roger Pau Monné wrote:
> On Mon, Mar 14, 2022 at 05:19:37PM +0100, Jan Beulich wrote:
>> One thing seems quite clear though: Doing any of this with interrupts
>> enabled increases the chances for the read pairs to not properly
>> correlate, due to an interrupt happening in the middle. This alone is
>> a reason for me to want to keep IRQs off here.
>
> Right, TSC calibration is also done with interrupts disabled, so it
> does seem correct to do the same here for APIC.
>
> Maybe it would be cleaner to hide the specific PIT logic in
> calibrate_apic_timer() so that we could remove get_8254_timer_count()
> and wait_8254_wraparound() from apic.c and apic.c doesn't have any PIT
> specific code anymore?
Yes, that's certainly a further cleanup step to take (saying this
without actually having tried, so there may be obstacles).
Jan
> I think using channel 2 like it's used for the TSC calibration won't
> be possible at this point, since it will skew read_pit_count() users?
> In any case if we disable interrupts those will already be skewed
> because the timer won't be rearmed until interrupts are enabled.
>
> Thanks, Roger.
>
|