Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1094545ybf; Thu, 27 Feb 2020 05:00:15 -0800 (PST) X-Google-Smtp-Source: APXvYqywviP0Dk8CqsoaLaAfyg34ed/RtZtm5UxGGQMdMHmRzF1bisJ5lghVcG8haT+MDMUKeCkI X-Received: by 2002:a9d:7f98:: with SMTP id t24mr3347271otp.338.1582808415708; Thu, 27 Feb 2020 05:00:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582808415; cv=none; d=google.com; s=arc-20160816; b=KsE+jCgDHeV9+rnT5Ze3Ok4qfxyoM8hvxMrVTmZ79o0keWO1/+s+OXTrGtzQddjG2z WYSNH0kZOpTZHzkWaIVpTjQN7WOlzpD4XPOJgr/BL5RePZ0zCsGbOo+0viTul9MP/k0M dzcnB36tVNFcVxbVF78WvFDr0thOglqPr/y6hS2EvfkJ1KI84s6QYCwig1I+Tgt2huLe LgmYDA7vbk8tc1+pJ8d6mEVTfYdVBju2OS2r9mz86j8oTxWyfOywpXz+/YEQ2+v+0PU5 pFd3PytAPOI7LDk/wL6OyGXOwCXfs96sUfadSkoZthq2MdAtE5iIS4TRy9I7rmttuQPP vcTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=Om0SRg+/XzRunM3fL3lF2XHexrWaTr/sxkRp+GX1RwY=; b=MJ0KVt4Pt1QMcXVYYNG0gD5pb28yNE5ULdZYeVChuhZFtGIzw2HllKo76KV3Y05UVW RgvS9FBbqLJeIYBmHGTZvCGDTx3HrBv9jPD3vogb8tW+7RkeSNhW1qUNi3VRL2+d9aig +TwQUzkr8nyz0sFyalJ5bfk1YOZy/wD0j/jvqEuLIFYhyiTfrLfJEGCEhzkdCmfG4+Xf AHzW3aY3wrU1+2vbWXCl7uQ0YEclzG9Vr+po+97d06FcohOPU+RPRnoE5E3u0EF9Lflr YAL7l+bsnn1fkOkz/a/VMtfTIwXvl5dg5OlI9h5wz/DAPNgvJEI9tRJiG0tBANs/aq9X AViw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="W/sVBBNh"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t1si1380638otp.25.2020.02.27.05.00.02; Thu, 27 Feb 2020 05:00:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="W/sVBBNh"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729099AbgB0M6y (ORCPT + 99 others); Thu, 27 Feb 2020 07:58:54 -0500 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:55444 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729019AbgB0M6y (ORCPT ); Thu, 27 Feb 2020 07:58:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582808333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Om0SRg+/XzRunM3fL3lF2XHexrWaTr/sxkRp+GX1RwY=; b=W/sVBBNhp1QXWVCIbgmqXakPPFGBwcU2ohR9Pf1WB/M1YWFAn/6bvwl2qhV4qalVR4vvWL qfoiK6PF2lDwYUFddtVuxYU6T+9oR9oKNbTmJIqzyylFkYBiQXbzq/WjQIU42GaV0+hS07 1oydJahhUNkWWjfFlHH2EJkc2VEMr28= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-90-baq8B8pwORaWBaP8aGs9Wg-1; Thu, 27 Feb 2020 07:58:47 -0500 X-MC-Unique: baq8B8pwORaWBaP8aGs9Wg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 69288477; Thu, 27 Feb 2020 12:58:45 +0000 (UTC) Received: from prarit.bos.redhat.com (prarit-guest.7a2m.lab.eng.bos.redhat.com [10.16.222.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id B9C0E19C58; Thu, 27 Feb 2020 12:58:43 +0000 (UTC) Subject: Re: [PATCH] x86/tsc: Add kernel options to disable CPUID and MSR calibrations To: Thomas Gleixner , Peter Zijlstra Cc: linux-kernel@vger.kernel.org, Patrick Geary , Jonathan Corbet , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, Mauro Carvalho Chehab , Josh Poimboeuf , Andrew Morton , Pawan Gupta , Juergen Gross , "Rafael J. Wysocki" , Viresh Kumar , Daniel Drake , Michael Zhivich , linux-doc@vger.kernel.org References: <20200226164308.14468-1-prarit@redhat.com> <20200226165407.GB18400@hirez.programming.kicks-ass.net> <87k149nd4p.fsf@nanos.tec.linutronix.de> From: Prarit Bhargava Message-ID: <64e49d3f-ac4c-84ca-e663-92f87aae1362@redhat.com> Date: Thu, 27 Feb 2020 07:58:43 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <87k149nd4p.fsf@nanos.tec.linutronix.de> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/26/20 6:27 PM, Thomas Gleixner wrote: > Peter Zijlstra writes: >> On Wed, Feb 26, 2020 at 11:43:08AM -0500, Prarit Bhargava wrote: >>> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt >>> index dbc22d684627..0316aadfff08 100644 >>> --- a/Documentation/admin-guide/kernel-parameters.txt >>> +++ b/Documentation/admin-guide/kernel-parameters.txt >>> @@ -4942,7 +4942,7 @@ >>> See Documentation/admin-guide/mm/transhuge.rst >>> for more details. >>> >>> - tsc= Disable clocksource stability checks for TSC. >>> + tsc=option[,option...] Various TSC options. >>> Format: >>> [x86] reliable: mark tsc clocksource as reliable, this >>> disables clocksource verification at runtime, as well >>> @@ -4960,6 +4960,12 @@ >>> in situations with strict latency requirements (where >>> interruptions from clocksource watchdog are not >>> acceptable). >>> + [x86] no_cpuid_calibration: Disable the CPUID TSC >>> + calibration. Used in situations where the CPUID >>> + TSC khz does not match the actual CPU TSC khz >>> + [x86] no_msr_calibration: Disable the MSR TSC >>> + calibration. Used in situations where the MSR >>> + TSC khz does not match the actual CPU TSC khz. >> >> Do we want to mention that these situations are mostly broken firmware? >> Also do mention that if you disable these you might not boot due to not >> having a PIT/HPET at all? > > Right. Same discussion as before. > > Also why do we want no_cpuid_calibration and no_msr_calibration? How > should Joe User figure out which one to use? This does not make > sense. The point is that the BIOS/Firmware supplied value in system > registers is bogus. So something like "skip_firmware_calibration" might > be better suitable. no_cpuid_calibration was required for Patrick's case where the CPU was overclocked and therefore the CPUID khz value was invalid, but the MSR value is good. I had to skip both to get to the PIT calibration because I had broken FW. I don't see how a single skip_firmware_calibration covers these cases. > > Aside of that this really wants to be combined with the ability to > supply the actual frequency on the command line as I suggested in the > other thread to cope with machines which do not expose PIT/HPET or have > broken variants of them. tglx, can you give a lore link to the thread? Thanks, P. > > Thanks, > > tglx > >