Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp2198881pxu; Fri, 9 Oct 2020 10:15:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYSq98QOhhWyOtAvshsNzHJ+fKnliKbTMiSHihuelDXEMw50RbOE8LtEBTQztW+qvq+Vfr X-Received: by 2002:a17:906:8297:: with SMTP id h23mr14766958ejx.383.1602263703741; Fri, 09 Oct 2020 10:15:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602263703; cv=none; d=google.com; s=arc-20160816; b=sAatz3G4EBHE53oRfyfSjl6VbOSg+ow5LEVL8B+M1rAhlJEuPMgAhWAl77nm/M+DdY x7IaA5cUNy9EYZJjXycs8NMEsWUnOXQ0qbWhqYIUMfzAGaaMTT9j2VS2M6tkKjwZc18f PGizO3Mr1xfB/sHNTxBAtBzAxbAjZDrOOs/YsiPTYUzwK9YG568fsogTgNiOkbF+rF0g U4qw/3CbwbIpwMsxCwIR/wvQZsbELThNL4FToVgxMxt3FzhaDiBc6v0OvgB6SxVvOfC9 VHpw+rtH58cO4bNnbP9cn4uIiPaGXLaQdeXOVvDN/6pnPoz3Zk4KGK7WWzqndtnVNXej 60TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/ClJchKp0ikj2wNIM+u+4iC4WzNwd2ei6WliGpK0apI=; b=ylwktlBPuMOfRNQiD0K3T7iU+R4UqKrPOZ+waW2l0yJsrpH25d7HjhoilcGIJFEXNR 7kpfyTlfNO75rUBVibmBxiZ/TthPPLP9MsmUzH6tpbkQRFUB6COYJCDgfN0v7//NHM4k o6z9sRQvkwGb/SVdenLxsLE2J1NmzvtbWzqkS33R+d2qVweIMFhV7mwS+vFiz+WQKXlm qPuxXPeXypzrPhKXSTBG+UPXjbKxAS7BCZRQPWNMMaw9e0TB+t54ctnno1P8FdEwVF8T 5Yyje4sprVjeXWo2LVMaoLgDAa5fWbh+qO6W4iB2y+8LJpmJl88rA3fTUgoZMcF0zEfD 4JGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=c7i9Yo8N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id df7si8417072edb.271.2020.10.09.10.14.40; Fri, 09 Oct 2020 10:15:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=c7i9Yo8N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733280AbgJIJxZ (ORCPT + 99 others); Fri, 9 Oct 2020 05:53:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725917AbgJIJxY (ORCPT ); Fri, 9 Oct 2020 05:53:24 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 965F4C0613D2 for ; Fri, 9 Oct 2020 02:53:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=/ClJchKp0ikj2wNIM+u+4iC4WzNwd2ei6WliGpK0apI=; b=c7i9Yo8NOF+jporKly0ZFFUffi XmNjqy56fbFatcBuFMJPFsiBaO3UrG0H3IZ/tzxzuDwWSedBFCs3foE8BZ8As6e5kmrAbmXG338Vs BOgtVfUX6SBxhDrUSrn79iJIeXJFfOdJ+ysWZSh7YOmvZKP24rxNc34kcXhspSfQkEmSXTr7wCq8/ KHQSTuPEKfx4c8mhmq8ue/6iIQF6DRCjXPnb8tMJRqurbv9ZDBSvY/xShPczWTWNX1BUuKru2yOSB 6p0SkVTRoAzxRjOyvwi4PTf+OSUwCRPn5Kht28zAucz4+wiGKrLNOR5p44JsqqDM/CEOnUe24gh6r dSoSFiig==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQp5C-0005ck-08; Fri, 09 Oct 2020 09:53:02 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 12F52300B22; Fri, 9 Oct 2020 11:53:01 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0162829E787A9; Fri, 9 Oct 2020 11:53:00 +0200 (CEST) Date: Fri, 9 Oct 2020 11:53:00 +0200 From: Peter Zijlstra To: Will Deacon Cc: kan.liang@linux.intel.com, mingo@redhat.com, acme@kernel.org, linux-kernel@vger.kernel.org, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, eranian@google.com, ak@linux.intel.com, dave.hansen@intel.com, kirill.shutemov@linux.intel.com, mpe@ellerman.id.au, benh@kernel.crashing.org, paulus@samba.org, David Miller Subject: Re: [PATCH V9 1/4] perf/core: Add PERF_SAMPLE_DATA_PAGE_SIZE Message-ID: <20201009095300.GI2628@hirez.programming.kicks-ass.net> References: <20201001135749.2804-1-kan.liang@linux.intel.com> <20201001135749.2804-2-kan.liang@linux.intel.com> <20201009090927.GQ2611@hirez.programming.kicks-ass.net> <20201009093750.GD29594@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201009093750.GD29594@willie-the-truck> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 09, 2020 at 10:37:51AM +0100, Will Deacon wrote: > On Fri, Oct 09, 2020 at 11:09:27AM +0200, Peter Zijlstra wrote: > > Patch 4 makes it all far worse by exposing it to pretty much everybody. > > > > Now, I think we can fix at least the user mappings with the below delta, > > but if archs are using non-page-table MMU sizes we'll need arch helpers. > > > > ARM64 is in that last boat. > > > > Will, can you live with the below, if not, what would you like to do, > > make the entire function __weak so that you can override it, or hook > > into it somewhere? > > Hmm, so I don't think we currently have any PMUs that set 'data->addr' > on arm64, in which case maybe none of this currently matters for us. > > However, I must admit that I couldn't figure out exactly what gets exposed > to userspace when the backend drivers don't look at the sample_type or > do anything with the addr field. Patch 4: https://lkml.kernel.org/r/20201001135749.2804-5-kan.liang@linux.intel.com is the one that exposes this to everybody with perf support. It will then report the page-size for the code address (SAMPLE_IP).