Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3918071imu; Mon, 7 Jan 2019 11:55:01 -0800 (PST) X-Google-Smtp-Source: ALg8bN7nWYDxmgX5+xd7vpi1XWCWBIVdESUvyugiVKr1tFnRTYC8nRKL3YCpaVkqJD/bkdI0BFee X-Received: by 2002:a63:5207:: with SMTP id g7mr12173290pgb.253.1546890901032; Mon, 07 Jan 2019 11:55:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546890901; cv=none; d=google.com; s=arc-20160816; b=PCkNE6RYVr3TW9cNYR205iIveWHXih+A/atSI8lVMJNFYR6eEm2wnumhMSLWQyUmDj +3DM4PL2IlyaGucCLhYZABpe2s4fhefOX1eoaQ9VlQJg+08g1gX+zIqc3etna3ZVbov6 ilg9/obB0OWrt7yGtA1FvZSulU6guhUWPdX+fxHjEQvf3IO5JVxD7S3ZP7wzgpXOPbS7 ZOPe6VTSC1rfMbiyTK+Futqaa4qKCHxAu6ys+vFwKtWmqxBbrjL9wT2r0z6LdiH/iKWO S3mSJJzM1DDRgM1LjN5ii/0/rolvVr7K9TZNsi3fhc3mv4NrPszC3PYGDWtfqB6hNmgp XApw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=GtWpeKyfFUi49ulQ4FppWq7mFLs8k1BBbuYAu9x3aOk=; b=dz9OC77SchxtEXi2s1AHhIl4l94LQhnUVWVbepUsJtSd+Xim8bnNLGMtuV5RB6C9G2 Up7srNb3OZ2hT4gDJLmQZWrbYLQ4Fce6zbkaJgsiNY8HbTMBkTRyCuEc3gQzKDbbOATn IVz8jhLmSzfdSgkS8MD+EVkj2pgJUx/xYl+Hf7IkcO5CRphd/fnnUUgzuFo7kIiUOQD2 IXmw8pnLN4IJAywRv4IgY3dHb8o881gALxATGLSooCZ4aozc4/WE+N4mNoHxeoGM8VEt KCxThNUsNmbHHYyeQWTUhM0P9IWeroyKgmtAFhlTayFQkpCsp6A+mTZmJILO6J7/97hg +yzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=KXCJLQ73; 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 r81si3548681pfr.164.2019.01.07.11.54.46; Mon, 07 Jan 2019 11:55:00 -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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=KXCJLQ73; 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 S1727119AbfAGQdB (ORCPT + 99 others); Mon, 7 Jan 2019 11:33:01 -0500 Received: from merlin.infradead.org ([205.233.59.134]:39498 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726746AbfAGQdA (ORCPT ); Mon, 7 Jan 2019 11:33:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=GtWpeKyfFUi49ulQ4FppWq7mFLs8k1BBbuYAu9x3aOk=; b=KXCJLQ73FxXiU7iXxKU/825n7 Hrmix1nuYg7LjHB9ZLyqg7WEh+8AAdRF99pm7kv9/IdiqieOW7KnQJ6rXSajFAzadYeGXkwglDQP6 sgcOOfArku1G2qXWQ1WGq5Pg9MyIhuWfiamm1tpYcSCTpmBuGyIIPhJc3Bg7jv8uqfefbjXKn0610 3EDdqSCm++Gu3erW39DBH7oxNFxLnH9kRzob/S6LlyLo+YjzZev+MQrQpnoqFeiN9lL0L2yiQtNyu 5Jdj7I6EoNUesbKRpm84hcakELIYYzELEafCkIxO1XCNbKpKGPV0FeQC3fL346K/xacZ+4qaBlFRX rVxosnYtw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1ggXpH-0006Xi-1g; Mon, 07 Jan 2019 16:32:31 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id EF63C200BB704; Mon, 7 Jan 2019 17:32:27 +0100 (CET) Date: Mon, 7 Jan 2019 17:32:27 +0100 From: Peter Zijlstra To: Andi Kleen Cc: Nadav Amit , Ingo Molnar , Andy Lutomirski , Josh Poimboeuf , Edward Cree , "H . Peter Anvin" , Thomas Gleixner , LKML , Nadav Amit , X86 ML , Paolo Abeni , Borislav Petkov , David Woodhouse , adrian.hunter@intel.com, Alexander Shishkin Subject: Re: [RFC v2 0/6] x86: dynamic indirect branch promotion Message-ID: <20190107163227.GH14122@hirez.programming.kicks-ass.net> References: <20181231072112.21051-1-namit@vmware.com> <87zhshe66w.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87zhshe66w.fsf@linux.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 03, 2019 at 02:18:15PM -0800, Andi Kleen wrote: > Nadav Amit writes: > > > > - Do we use periodic learning or not? Josh suggested to reconfigure the > > branches whenever a new target is found. However, I do not know at > > this time how to do learning efficiently, without making learning much > > more expensive. > > FWIW frequent patching will likely completely break perf Processor Trace > decoding, which needs a somewhat stable kernel text image to decode the > traces generated by the CPU. Right now it relies on kcore dumped after > the trace usually being stable because jumplabel changes happen only > infrequently. But if you start patching frequently this assumption will > break. > > You would either need a way to turn this off, or provide > updates for every change to the trace, so that the decoder can > keep track. I'm thining it would be entirely possible to create and feed text_poke events into the regular (!aux) buffer which can be timestamp correlated to the PT data.