From nobody Tue Nov 11 05:25:05 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1571839098; cv=none; d=zoho.com; s=zohoarc; b=Sy8OIuMH85X5Z3p6TLfpsGJ5osu9XDPbDxKoGlpj1aoRz9bT30L3FIhOfxXZ53CglLdLak+Xkb4mGpnqOJT7IrwkL6SSrbLr/tivBtHMSvyU6zPVR+Ev2HkLB1EC1eHJD8RNenZf+u3iXSlVwLv3HtOUR1pT5nLifpbqkNP+PmA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571839098; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=8fpMA0M41EZVdlQj/5RElO7Q3X0lzHndcRlhnhVkxZw=; b=OV7z5iWbRXP6K/3CZoXerssEYSc1JVLGyHjpkgeasr6iryCG/s8WwLSNMEg1yJTXBhG4Ngr7oZZtVILIyrdY2qvxuIgCxuUsKGF/GFR8msjegeXj8RlR3KR4PJ87YrP0pl8n0LlSU8NkqIlG+U9GdQ5I1qiWl+bL4jTx9CQcr/s= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1571839097939135.919548480907; Wed, 23 Oct 2019 06:58:17 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iNH8V-0004VX-0j; Wed, 23 Oct 2019 13:57:15 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iNH8T-0004VQ-FO for xen-devel@lists.xenproject.org; Wed, 23 Oct 2019 13:57:13 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 00120ac4-f59d-11e9-947f-12813bfff9fa; Wed, 23 Oct 2019 13:57:07 +0000 (UTC) X-Inumbo-ID: 00120ac4-f59d-11e9-947f-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1571839028; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=S1ApxgzkXxboqRC1e3Rq41CYUE483OLEKpImJSR0BUY=; b=fewAscPE1C2i/244eV18V48rr53naaq36eI8/XqPEysHo+dEbLXv+B4O AYql4jMB9qZxfA9eJF1k91dZ5gCFPEKAleA4KacgzSZxKGdCGa6nMD9V8 Ok08Y++NCdlNBI30LM/Ra6azsjn35AsCm7MnNe8/GG4GRmqsFp0at6EPz 0=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@citrix.com; spf=Pass smtp.mailfrom=roger.pau@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa1.hc3370-68.iphmx.com: no sender authenticity information available from domain of roger.pau@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa1.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa1.hc3370-68.iphmx.com: domain of roger.pau@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa1.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa1.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa1.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: b97/1i6nCszHKDuqqDlkTqssclkget8OF01ULZeKAbgaX9wmBfKHohTII7Ei7gX/AruOJ2qhVK W0zwIMm01wU0MSDSBXsMep3g5muVmHxcp7pRk4dgmXflkpJu94w3jnVvQB9694grrsOHj70fcg JjuR4lvejSgoG21kY27V14Yroe2qdW/vzM7QfLBLTsuR5B2DevltWJFOpcMRu1sE8/KF4udhUU 2lhCw//L+1thap38/OhwamzPD1H3dmUC/ZW59drxZTjdH5SCjzree/ft2h6Ftja18zdO9NAUOM NKw= X-SBRS: 2.7 X-MesageID: 7415753 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.68,221,1569297600"; d="scan'208";a="7415753" From: Roger Pau Monne To: Date: Wed, 23 Oct 2019 15:56:44 +0200 Message-ID: <20191023135644.46847-1-roger.pau@citrix.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH] x86/tsc: limit the usage of synchronization rendezvous X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Wei Liu , Jan Beulich , Roger Pau Monne Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) If Xen detects the TSC is unreliable it will set a rendezvous helper that tries to synchronize the different CPUs TSC value by propagating the one from CPU#0 and writing it into the IA32_TSC MSR on each CPU. When the system has a single thread and there are no hotplugable CPUs doing the above just results in reading the TSC from CPU#0 and writing it into the IA32_TSC MSR of CPU#0, which is pointless, so limit the usage of the synchronization rendezvous to systems that have more than one CPU, even if those CPUs are yet to be hotplugged. Signed-off-by: Roger Pau Monn=C3=A9 --- I'm not sure whether this is suitable for 4.13, being a performance improvement but not fixing a functional bug. --- xen/arch/x86/time.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index d8242295ef..dddbb60f58 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -1821,7 +1821,8 @@ static int __init verify_tsc_reliability(void) * are not marked as 'reliable', re-sync during rendezvous. */ if ( boot_cpu_has(X86_FEATURE_CONSTANT_TSC) && - !boot_cpu_has(X86_FEATURE_TSC_RELIABLE) ) + !boot_cpu_has(X86_FEATURE_TSC_RELIABLE) && + num_present_cpus() > 1 ) time_calibration_rendezvous_fn =3D time_calibration_tsc_rendezvous; =20 return 0; --=20 2.23.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel