Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2130328imm; Thu, 19 Jul 2018 13:48:31 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe1565oCG+NCI6dhc9fcQDUByBdp/tl8oziC91x590kPuSP8lWSy2I6g4IGp3hFi8ieWbmN X-Received: by 2002:a62:8b87:: with SMTP id e7-v6mr11063848pfl.133.1532033311242; Thu, 19 Jul 2018 13:48:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532033311; cv=none; d=google.com; s=arc-20160816; b=Wj0f0e2EGeKJWexx7FtCcO8P2QqhCq8KUpXQOzTGpgDc4fd/K1AxMBg0wsQM9MbOna l2mnQtT3SXRFJ7EprPHlT4UNewp4Wk0dvJoz1c91+FiW5hmeDkUw2GZNejjL5oLAZf2W RHekylyDRU+zcMHOzc0fnbpNd/2V0kA8t0PInPXHpTaXwe2yxAOxFdiajUCg88PX20LA VsAq9zGX7jfn34EC3NqSZfQ5O+p10+3iiycfW7NUtM3hXzFoFOpMePj9dpMq4ArAADKZ OlxX9GkNIJ92092e6CaAx+kEb7neOWyfPvVBO5+Hs1cPdU3qiyCo/093s3yhhE1942sH RA4g== 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 :arc-authentication-results; bh=hCbfYzHy2VPUGTIZDFyoI28Bb6i4Aj1f1ubmsNa0Ua0=; b=xMMvx+rpupE64vR3QcL1ThLW8+PJdLcKh3mVW+O+E3umKo5C83ObAR6Pa6vaxrae4W ynz/n9zKipFc39hyszj5bUQ/ep1EY3qHUrsQnaMD/qpN2ZwzSnZGSQZAxszXlIcp5RAn yVEfUfk1CftPBF+9jaBOM2okzwLuaBtQ5nNEyg9769QchAOJ0c6Ys3EnIoOdyZBUjsj0 WWvIVe8E1aTyLZ9pkhfNJlgZRJOnmnOzZnFH0VMxKAC1P6L62iqZRfeg85xJ/Hbd4Wlw uJ+6++Q1eNBTlm+SMLfy3F6b2+b658FlBgroC9entWuY8g/a9vtrZzuyX58bJI6FzV2u TKsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=HWET9PP6; 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=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d8-v6si125817pgn.382.2018.07.19.13.48.16; Thu, 19 Jul 2018 13:48:31 -0700 (PDT) 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=@oracle.com header.s=corp-2018-07-02 header.b=HWET9PP6; 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=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730054AbeGSVca (ORCPT + 99 others); Thu, 19 Jul 2018 17:32:30 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:42696 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728050AbeGSVc3 (ORCPT ); Thu, 19 Jul 2018 17:32:29 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w6JKhlCx152834; Thu, 19 Jul 2018 20:46:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=hCbfYzHy2VPUGTIZDFyoI28Bb6i4Aj1f1ubmsNa0Ua0=; b=HWET9PP6sj3/2TwrFC4TjgqTSd0PwVuGf6BEi9dKZ0IecyWtIDLICk4GeOJEf/paF7c+ Qqu4Iv2ofUkbiGXOmAOWiTll2mCQGnOm8bC5FY6EPhUVmIDOqrN4Y8VM4qQyIc0m0jKi CcTVVXIypqUirbmcZt8MPBn8g3eoDuyTkcqO6kzhA8A4bxTHOFES5WWyDEQ5ODie8UGj Ybrsm79PkyeaJSV6Qf9jwaMtg9XRjuv6t5KqqHZi3Iv+QkhD/1XbvCIaBymkqIlD/qi0 Ofw76xkB0CftObbH4ZBpMK097QK0opKZ27WpaClK71aVqe7UhFQD+C+axEtsTh8Zd8jh CA== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2k9ykc8u8b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Jul 2018 20:46:47 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w6JKkkjm015386 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Jul 2018 20:46:46 GMT Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w6JKkkGA029904; Thu, 19 Jul 2018 20:46:46 GMT Received: from [192.168.1.10] (/73.69.118.222) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 19 Jul 2018 13:46:45 -0700 Subject: Re: [PATCH v14 20/25] x86/tsc: calibrate tsc only once To: Thomas Gleixner Cc: peterz@infradead.org, Steven Sistare , Daniel Jordan , linux@armlinux.org.uk, schwidefsky@de.ibm.com, Heiko Carstens , John Stultz , sboyd@codeaurora.org, x86@kernel.org, LKML , mingo@redhat.com, hpa@zytor.com, douly.fnst@cn.fujitsu.com, prarit@redhat.com, feng.tang@intel.com, Petr Mladek , gnomes@lxorguk.ukuu.org.uk, linux-s390@vger.kernel.org, boris.ostrovsky@oracle.com, jgross@suse.com, pbonzini@redhat.com References: <20180718022211.6259-1-pasha.tatashin@oracle.com> <20180718022211.6259-21-pasha.tatashin@oracle.com> <20180719103340.GA2494@hirez.programming.kicks-ass.net> <4295075b-8a0f-1723-2e80-1bbd2f038846@oracle.com> From: Pavel Tatashin Message-ID: Date: Thu, 19 Jul 2018 16:46:43 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8959 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=941 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807190216 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/19/2018 04:44 PM, Thomas Gleixner wrote: > On Thu, 19 Jul 2018, Pavel Tatashin wrote: > >> On Thu, Jul 19, 2018 at 12:49 PM Pavel Tatashin >> wrote: >>> >>>> So create two functions. native_...early..() and native....(). The early >>>> one does not contain the hpet/pmtimer stuff and it replaces the ops.pointer >>>> with the late one which contains all of it. >>> >>> Good idea. Actually, the late one will contain only hpet/pmtimer and I >>> will set it only if tsc frequency was not determined only. >> >> If we determined tsc early in boot using one of the quick methods: >> from cpuid/msr/quick_pit, can we assume that frequencies of all other >> CPUs will be determined the same way? Or do we still have to fallback >> to PIT/HPET/PMTIMER? I wondering if we support heterogeneous >> multi-socket platforms with different CPUs, because that the only >> platforms where I see such scenario is possible. > > The frequency for secondary CPUs is usually taken from the boot CPU and the > only reason why recalibration can happen is when the CPU does not have a > constant frequency TSC. > > For that case the quick PIT + hpet/pmtimer calibration bundle is > required. So yes, the early calibration might work with quick PIT (those > CPUs definitely do not have MSR/CPUID based calibration), but the > recalibration might fail the quick PIT calibration for various reasons. OK, good, I implemented with this in-mind. I will send out a new series shortly. Thank you, Pavel > > Thanks, > > tglx >