Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751732AbaFEMCy (ORCPT ); Thu, 5 Jun 2014 08:02:54 -0400 Received: from mail-oa0-f48.google.com ([209.85.219.48]:51990 "EHLO mail-oa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751405AbaFEMCw (ORCPT ); Thu, 5 Jun 2014 08:02:52 -0400 MIME-Version: 1.0 In-Reply-To: References: <1401917658-26065-1-git-send-email-eranian@google.com> <1401917658-26065-10-git-send-email-eranian@google.com> Date: Thu, 5 Jun 2014 14:02:51 +0200 Message-ID: Subject: Re: [PATCH 9/9] perf/x86: add syfs entry to disable HT bug workaround From: Stephane Eranian To: Matt Fleming Cc: LKML , Peter Zijlstra , "mingo@elte.hu" , "ak@linux.intel.com" , Jiri Olsa , "Yan, Zheng" , Maria Dimakopoulou Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 5, 2014 at 1:16 PM, Matt Fleming wrote: > On 5 June 2014 11:19, Stephane Eranian wrote: >> How would you know that you have a uniform workload from inside >> the kernel? > > That's what I'm asking you ;-) > No way to know this otherwise we could play some tricks. >>> Does cpu_sibling_map not give you some indication of whether HT is >>> enabled? I think the topology_thread_cpumask() is the topology API for >>> that. But I could most definitely be wrong. Hopefully someone on the >>> Cc list will know. >>> >> Remember trying some of that, but when perf_event is initialized, those >> masks are not yet setup properly. > > Oh, bummer. > I think those should be initialized earlier on during booting. > If there's no way to detect whether we should enable this workaround > at runtime (and it sounds like there isn't a good way), then that's > fair enough. > > We should think twice about allowing it to be disabled via sysfs, > however. Because what is guaranteed to happen is that some user will > report getting bogus results from perf for these events and we'll > spend days trying to figure out why, only to discover they disabled > the workaround and didn't tell us or didn't realise that they'd > disabled it. > > If the workaround is low overhead, can't we just leave it enabled? It is enabled by default. Nothing is done to try and disable it later even once the kernel is fully booted. So this is mostly for testing and power-users. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/