Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1991833pxu; Fri, 9 Oct 2020 05:21:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEikkNyXT/drFGsBM+5Y8IQ1NqD14Th4q/pp45e4+Krh9T23XBTUtUeuny3H0FC3/rj7m5 X-Received: by 2002:a50:9b14:: with SMTP id o20mr13613867edi.328.1602246084576; Fri, 09 Oct 2020 05:21:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602246084; cv=none; d=google.com; s=arc-20160816; b=NWWM/F9Tp84k56PLhj+8Jib1uzPbqSy2X7UWwSPwyndI/bI1UWCoPhHNT/8T0HSNYH 9Mxy5E2EyLEi0Q9FW3PF9mSzhXgb8+8PUaeq8mRjrQb095nL4fZOYRACzLySGzQkwQzy IDdngC0hQUt1iwTmeLv3c26JKMJRugFaldooaho7d5lU69Bb30j0exqGbxfw7QmRmaC8 eInn60IzTHkCjPl2EzXtfb2WUHX9UNMscsYzwxETjwrqeGZ5Idxjbn6iFgbpu67B6C+x cQJxQxo5uBdy7JB3/yHKr2FsX/lM/eCVu2rOdEbxC8jfpfWrpsZRD3YSp7avQtU/AO3M OPYw== 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=y21hzAeH0iN3CCdZ7u60F0himStwk45E92eSH+vcx6I=; b=v6N1415Bnynnk8urnTMIxEUqZRCG9azALlqJhBoEaZQSzotYaSlO3qHr+v7D4IEdLQ 5uQco4dD19PELSeQlgxi/uTa68gBY+zxkoMNzatLD3EP9Oxr0h0HZewRANSkegPzDckR QjP8BbNMSqYCSIiHngGICDwnCrjIXIMwciG7TANVdTvmqNtJPKwa7aaPfB8jeZC1jQBl QeBYVGGdGy/hDxeLoEygoa3UMRSjY/Dfovh6idt7YOyox4Mm7+r2Pn2gcfkiXhMEXe4u kJBvtMaXVeOUEWW+If8/WiFmkUkr0c+R5Uo3KW3pU8Nx02HFXlXBlkyV+z/eLizhRvZM KLPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=E7gdOdoz; 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 c21si5754159eja.739.2020.10.09.05.21.01; Fri, 09 Oct 2020 05:21:24 -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=E7gdOdoz; 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 S1733064AbgJIJQu (ORCPT + 99 others); Fri, 9 Oct 2020 05:16:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731262AbgJIJQt (ORCPT ); Fri, 9 Oct 2020 05:16:49 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54ED2C0613D2 for ; Fri, 9 Oct 2020 02:16:49 -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=y21hzAeH0iN3CCdZ7u60F0himStwk45E92eSH+vcx6I=; b=E7gdOdozrI2njdSPkwQhFu7otU UqkSfte/igxyDpt6+dcbY6NPnSTjrxm7HBZdtiPAsUlMHa1f+oYZfYO9h6EIHL0BnphanSlQn8Y8k jCtvKmKRZr2DsErTulTXJD2xkpW3ZeBNVeuT8sdgFD1hHm3mnH6VTrMIWFU16H9Q1c3YkxF2VAE/k BE48/hQnFihC7Egtib3aLJVEtiV3/IAl4bOpXxkF8Or9VlSnCwnVroyFZ933wxkLvYi1kSWFv1QzN +J5XFNSCRBA/GwERcaSnnS6YoTevsMiHra7/tBgX363tCNMkpZO6RSPyCX/eYs//WybOr50rHWBl6 7VZRCziw==; 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 1kQoVW-0003Bn-DE; Fri, 09 Oct 2020 09:16:10 +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 7C4A0300B22; Fri, 9 Oct 2020 11:16:07 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 463052019D2CA; Fri, 9 Oct 2020 11:16:07 +0200 (CEST) Date: Fri, 9 Oct 2020 11:16:07 +0200 From: Peter Zijlstra To: kan.liang@linux.intel.com Cc: 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, Will Deacon , David Miller Subject: Re: [PATCH V9 1/4] perf/core: Add PERF_SAMPLE_DATA_PAGE_SIZE Message-ID: <20201009091607.GM2651@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201009090927.GQ2611@hirez.programming.kicks-ass.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 09, 2020 at 11:09:27AM +0200, Peter Zijlstra wrote: > @@ -7046,6 +7059,10 @@ static u64 __perf_get_page_size(struct m > return 0; > } > > + page = pte_page(*pte); > + if (PageHuge(page)) > + return page_size(compound_head(page)); Argh, this misses pte_unmap().. > + > pte_unmap(pte); > return PAGE_SIZE; > }