From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762002AbdEVUBx (ORCPT ); Mon, 22 May 2017 16:01:53 -0400 Received: from mga05.intel.com ([192.55.52.43]:56151 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761986AbdEVUBq (ORCPT ); Mon, 22 May 2017 16:01:46 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,378,1491289200"; d="scan'208";a="105253012" Date: Mon, 22 May 2017 13:01:44 -0700 From: Andi Kleen To: Stephane Eranian Cc: "Liang, Kan" , Peter Zijlstra , "mingo@redhat.com" , LKML , Alexander Shishkin , Arnaldo Carvalho de Melo , Jiri Olsa , Linus Torvalds , Thomas Gleixner , Vince Weaver Subject: Re: [PATCH 2/2] perf/x86/intel, watchdog: Switch NMI watchdog to ref cycles on x86 Message-ID: <20170522200144.GE15563@tassilo.jf.intel.com> References: <1495213582-3635-1-git-send-email-kan.liang@intel.com> <1495213582-3635-2-git-send-email-kan.liang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > The ref cycles always tick at their frequency, or slower when the system > > is idling. That means the NMI watchdog can never expire too early, > > unlike with cycles. > > > Just make the period longer, like 30% longer. Take the max turbo factor you can > get and use that. It is okay if it takes longer of machine with > smaller max Turbo ratios. That would be a ticking time bomb. Turbo ratios are likely to grow. There's no architectural way to get a turbo factor. Even if there is a model specific MSR it would likely not work in virtualization etc. You could make the timeout ridiculously large, but even that would have a small chance of failure. -Andi