Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp507421pxp; Wed, 16 Mar 2022 10:05:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykJkCUhMrsGRuC4RL7bp9tMnNOJ4z81/rMfQSfYGmSmBA159tQ6tljLJzeOzSMyisbq/VI X-Received: by 2002:a05:6402:2552:b0:416:a745:9626 with SMTP id l18-20020a056402255200b00416a7459626mr402520edb.405.1647450353592; Wed, 16 Mar 2022 10:05:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647450353; cv=none; d=google.com; s=arc-20160816; b=RVh9Ix/1Ncu4jV97XQArPPqogO9qacC2cRwPnfPO3sdTz6Vqnmvvzoos9ncKZrddJd eUEbPmZF/b1rGKu/y2vfd6gooTTZzoxiMcyb25AsJ16YEeoO3+omLYkmH3JjVMGYMKSx ibkeD+V3LEFrhox77CLLiyCXFzkSCjsfwr0aLEAKLPqd9YYAafCGkaaqljqipikw/pa8 5L4UkBIaKpo4fXcatYHpasjiYMlBIf3/SZCzJ/NBtw64OASjYKtQ5VqRGh5jBxDEt+3l 7STFpPqif9tCjEfH/ZnX+XIC5Aws/il2aFbH5GAjku5anreeHdiwmi1P+mbyyLMI8T0R 8QZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=tqJHT//xiq6dITMRQEDAd+gavzGHZ8ahhHzH25P856g=; b=idwZxLj4NLedTBuWR/eUkRydPa4kDrB52oRrYrWmHSofkEcU5VSfGjL37/LpZgA8He PtFpHmbplh6EGNavYiMSwwhoSZNdAAeG88W7Fd67J7S7485FoVhOLFpUbpUQ67b4Chbv 29y8uDo/JS3E84vSRT/3hp4gxNFoEv+3UTtRnAAolXGWY17UaiKJOTZJLRXcc8G543Pt SAwYAW+2RuiHtTbw/pjs34U4ugu2/JYbHKMs9PaqJE6RdvbD/lw0HANmtFdekvUr33OB W1Rj1kzIuSsH+4mqdB9cUs9+1sUNb0VVkyoGXEvMTR7nip5UAfSTS/AvO5ey1VmTWWjN qoqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VOqQm3Aw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h12-20020a05640250cc00b004166465b969si1789258edb.569.2022.03.16.10.05.24; Wed, 16 Mar 2022 10:05:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VOqQm3Aw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344164AbiCOBe1 (ORCPT + 99 others); Mon, 14 Mar 2022 21:34:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237244AbiCOBe0 (ORCPT ); Mon, 14 Mar 2022 21:34:26 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECEB728E14 for ; Mon, 14 Mar 2022 18:33:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1647307995; x=1678843995; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=yO9gbWCF9l8nH8/EqHP3dKeO8aI+4QFUfkY8XyJQW4A=; b=VOqQm3Aw8n6ekAsB2wajKmEMLN+tiZTsHQfyiK981JGtlD8ytMLaF4+g ux8BSYmTdA7EX4yp/wwpr5AC6Ji87HjgC30AqJF5LuWOE6MPsnrVTQxUn vdHSzgayxMwCqzpaHHF9hG2X35LP1sXNAsVGkaEe51d8b+Y0L/mxfgSMK 0fFIZYD5/A6+4ccHhYRoy1DKiRhEkZ3jB4+8sNW/giiVk2aw1jMKITByF heTLURls6BKgeFpn0kA4jLQo+bNejdSCd85WUGu8okJWHOASs7I38O2Lj yhutZkFqmHenCyBrLeddmVnSRxrRmD/A+d8x+2Sne4Pd8XWipugOMUUn8 w==; X-IronPort-AV: E=McAfee;i="6200,9189,10286"; a="256377709" X-IronPort-AV: E=Sophos;i="5.90,182,1643702400"; d="scan'208";a="256377709" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Mar 2022 18:33:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,182,1643702400"; d="scan'208";a="512435383" Received: from shbuild999.sh.intel.com (HELO localhost) ([10.239.146.138]) by orsmga002.jf.intel.com with ESMTP; 14 Mar 2022 18:33:09 -0700 Date: Tue, 15 Mar 2022 09:33:08 +0800 From: Feng Tang To: Nicolas Saenz Julienne Cc: tglx@linutronix.de, andi.kleen@intel.com, bp@alien8.de, dave.hansen@intel.com, hpa@zytor.com, len.brown@intel.com, linux-kernel@vger.kernel.org, mingo@redhat.com, paulmck@kernel.org, peterz@infradead.org, rui.zhang@intel.com, tim.c.chen@intel.com, x86@kernel.org, mtosatti@redhat.com, frederic@kernel.org Subject: Re: [PATCH v3 1/2] x86/tsc: add a timer to make sure tsc_adjust is always checked Message-ID: <20220315013308.GA36349@shbuild999.sh.intel.com> References: <20211117023751.24190-1-feng.tang@intel.com> <20220314175207.274870-1-nsaenzju@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220314175207.274870-1-nsaenzju@redhat.com> X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Nicolas, Thanks for raising it. On Mon, Mar 14, 2022 at 06:52:07PM +0100, Nicolas Saenz Julienne wrote: > Hi Feng, Thomas, > > > On Wed, Nov 17, 2021 at 10:37:51AM +0800, Feng Tang wrote: > > Normally the tsc_sync will get checked every time system enters idle state, > > but Thomas Gleixner mentioned there is still a caveat that a system won't > > enter idle [1], either because it's too busy or configured purposely to not > > enter idle. Setup a periodic timer (every 10 minitues) to make sure the > > check is always on. > > > > [1]. https://lore.kernel.org/lkml/875z286xtk.fsf@nanos.tec.linutronix.de/ > > Signed-off-by: Feng Tang > > I can see this timer interrupting my system's nohz_full CPUs. It'd be nice to > be able to avoid the noise. A solution is using 'tsc=reliable', but IIUC this > is not what the flag was created for. Any ideas/suggestions? This patch is about correctness. And yes, as you said, the 'tsc=reliable' works. Another thought is to leverage the 'housekeeping_mask' to exclude the isolated nohz_full CPUs, but the 'caveat' what the patch try to solve remains. Also before this patchset, the clocksource watchdog timer is fired every 500ms, which should interrupt nohz_full CUPS more? Thanks, Feng > Regards, > Nicolas