From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72BA7C43387 for ; Mon, 7 Jan 2019 16:33:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3D460206B7 for ; Mon, 7 Jan 2019 16:33:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="KXCJLQ73" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727311AbfAGQdB (ORCPT ); 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.