Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1240664imu; Tue, 20 Nov 2018 14:09:08 -0800 (PST) X-Google-Smtp-Source: AFSGD/U6SJTRdILEepFgLWGD/c8juXk3GZlrAhS4sUAXXj9mlC29MqpM+n6Yi1fRqkmcsd9PF3be X-Received: by 2002:a17:902:680f:: with SMTP id h15mr4009766plk.40.1542751747937; Tue, 20 Nov 2018 14:09:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542751747; cv=none; d=google.com; s=arc-20160816; b=CimpYR+FRQX7edG6mL3o7NuVrw03hcEzro/2/xVuHpHI15duDuWS3+Hf1MyJtL9S/c hZX/pe+3/90y5onwDZ95oqISklThR2V0cHz1X0ek/DjLCgRZJEvecS2+ILRpUMCYYg8w npLyYr8FFOvOO+4lLGTPs4FRgAgyOAo7tbgZfkUIGydiE06T7jwV4Al8KxrMi8i90rS7 hL+iXmX/ezQCGyj7FW3MGzCkS0ZvGhxkh1speRcAWEP6gI4wrqcf4mrHPC4O2UlaC5Py Lzom8SfOxUfNs3rM4EBeILSApgxEq+lhF5ZbFXlMnToXq8Eg0gi+LTWzcXRSYhf2+UDq CAYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=I6hEfYqKqXbgdgyDI5u1/JKTzsBxjwJXGY3P96ND8RA=; b=Sd0vd8WyFxynPbF7ZPhtzr7HJ1/ojcokWJygTJQP7P4ih4/lxSWUlInW6dPDR+f9RS bKHgrME5OW0xrdGVobVXLHgCNbYpYIB5LDnwj95NEoJfgfXlY3OxsGRJOgKGkihCFpS0 MyuXzbtSCRESCIOj5Cbs2FjBNaYBkMLoLFlTlAPNvOHR0Om4Pmpea2M5djkjkatd6+AL RMdH5eAM5ixeC3kGKFqFo2TGnDquZpw7r6spjFafTvDc0uyCiwEPpXDfb46mDzM0xWe9 40KWAh35gxqgAzspSn4I8c3JBRSkDHUqHAUlkkmyMtkLo1kEjTYoZ45n/50MjhiTjq5T 2EPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kylehuey.com header.s=google header.b=Qy0YXGU6; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l186si42232923pge.205.2018.11.20.14.08.38; Tue, 20 Nov 2018 14:09:07 -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=@kylehuey.com header.s=google header.b=Qy0YXGU6; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726951AbeKUHY0 (ORCPT + 99 others); Wed, 21 Nov 2018 02:24:26 -0500 Received: from mail-vs1-f67.google.com ([209.85.217.67]:42837 "EHLO mail-vs1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725900AbeKUHY0 (ORCPT ); Wed, 21 Nov 2018 02:24:26 -0500 Received: by mail-vs1-f67.google.com with SMTP id b74so1929483vsd.9 for ; Tue, 20 Nov 2018 12:53:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kylehuey.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=I6hEfYqKqXbgdgyDI5u1/JKTzsBxjwJXGY3P96ND8RA=; b=Qy0YXGU65FtntcFPcq3T4po5Oo0EHVFfFeBtQNHSyX+L+sILRuSGifm67LQpvPWQpx eBn591oFh5xvFlGrHh5TeysxEUt7JFSis/30YrhYYAOri1Sr9Vl9Nn1jzv+cN1OIyZqw C0uJE1ES7Co0tjcqFOfNo3O2tKPDgvRXXa1nno+V3BJXzTv7K7l9tj5v3HcylVNQ7nWU +RPhSBdj3/+9UaCrS0zu92wmNUEJeNzsm1vq2gioc0cWDDjnbDHO4qGaXLRGfFhEiqDy nuJ7ibNOOAcgWCr1QnoRztCGFRn+mVQ6sI0DdgNjGnAuJHdfUy9fUib8IVSwARfHLBiR DOaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=I6hEfYqKqXbgdgyDI5u1/JKTzsBxjwJXGY3P96ND8RA=; b=mnfbZhkgZkXVqMP8OvJIR883OaLsWfvvDLGiVvHyUi1Wck9CssYbrxEo0bNSnNb7VS +gD7bs/mYtLbuVj7uYU+wJvOobEYonrvMwrOocMH7GzLsNFfRnxrnKvqBrSO6W6KmWK7 OFEKGL7mY3plP2rc2fO1MFOcAgLuEN9udBBD4SXYXptR7cjPR4JnTXVFWSQ0LDs4/e+9 +dTiQlAIRklHee+YALsGLdX6d2TGoomp3hr7CCFa50dIL4Gg5G0/wJOwElWT+rbACdau DJWFS8WgkncbU4dXGX+gITOpbY92XwYrxascPl+IdTi/fYkNszTLSp0oRMQnFaYcFQ7g Iejg== X-Gm-Message-State: AGRZ1gLn766oMvHW7WHiTZMISuQjpggApMlZ3hjWWp11lyoc7l4N+Mf2 G0xSETWdcvJztBM7ZX9MDYlN6+rHi0w2WrbuWYTU1A== X-Received: by 2002:a67:f1d6:: with SMTP id v22mr1528184vsm.181.1542747202035; Tue, 20 Nov 2018 12:53:22 -0800 (PST) MIME-Version: 1.0 References: <20181120194129.GC13936@tassilo.jf.intel.com> <20181120201144.GD13936@tassilo.jf.intel.com> In-Reply-To: <20181120201144.GD13936@tassilo.jf.intel.com> From: Kyle Huey Date: Tue, 20 Nov 2018 12:53:10 -0800 Message-ID: Subject: Re: [REGRESSION] x86, perf: counter freezing breaks rr To: Andi Kleen Cc: Kan Liang , "Peter Zijlstra (Intel)" , Ingo Molnar , "Robert O'Callahan" , Alexander Shishkin , Arnaldo Carvalho de Melo , Jiri Olsa , Linus Torvalds , Stephane Eranian , Thomas Gleixner , Vince Weaver , acme@kernel.org, open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 20, 2018 at 12:11 PM Andi Kleen wrote: > > > > > Given that we're already at rc3, and that this renders rr unusable, > > > > we'd ask that counter freezing be disabled for the 4.20 release. > > > > > > The boot option should be good enough for the release? > > > > I'm not entirely sure what you mean here. We want you to flip the > > default boot option so this feature is off for this release. i.e. rr > > should work by default on 4.20 and people should have to opt into the > > inaccurate behavior if they want faster PMI servicing. > > I don't think it's inaccurate, it's just different > than what you are used to. > > For profiling including the kernel it's actually far more accurate > because the count is stopped much earlier near the sampling > point. Otherwise there is a considerable over count into > the PMI handler. > > In your case you limit the count to ring 3 so it's always cut off > at the transition point into the kernel, while with freezing > it's at the overflow point. I suppose that's fair that it's better for some use cases. The flip side is that it's no longer possible to get exactly accurate counts from user space if you're using the PMI (because any events between the overflow itself and the transition to the PMI handler are permanently lost) which is catastrophically bad for us :) - Kyle