From patchwork Wed Dec 9 17:29:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Shi X-Patchwork-Id: 58171 Delivered-To: patch@linaro.org Received: by 10.112.147.194 with SMTP id tm2csp823972lbb; Wed, 9 Dec 2015 09:49:34 -0800 (PST) X-Received: by 10.98.2.18 with SMTP id 18mr19716pfc.5.1449683372820; Wed, 09 Dec 2015 09:49:32 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h10si13981123pat.126.2015.12.09.09.49.32; Wed, 09 Dec 2015 09:49:32 -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; 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; dkim=neutral (body hash did not verify) header.i=@linaro-org.20150623.gappssmtp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753220AbbLIRt3 (ORCPT + 28 others); Wed, 9 Dec 2015 12:49:29 -0500 Received: from mail-pf0-f174.google.com ([209.85.192.174]:36406 "EHLO mail-pf0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752942AbbLIRtV (ORCPT ); Wed, 9 Dec 2015 12:49:21 -0500 Received: by pfdd184 with SMTP id d184so33348763pfd.3 for ; Wed, 09 Dec 2015 09:49:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5lHMCJaRJ2z2Of4cHm0Z55ECc5kWoluL46dtbgmm3tA=; b=YcqsSlG2StPZBUu9IZ7lZW+MdFV+yuYCnHY4pumZh4dJ6ipmBG+8B6sTecydQoiNmN i8jlklv49SAgMJqRHLImgecHRIRwJ4SUSjcIC3Y8B2y3Ll1CmN2RQNd8oinOzCGku5La 45pbzUEMMHe8OeF93HUhKnw68C6l2OaBM60KdyETG8BlD1BSfCJjTKaN+WaafEr2LY5R M/vKY9AURbklOsf7WjOsKcUVTxipM40Jw/2DW4S+hpYJl0rICSAZiSZryHQbrm6TQl8C zbYADXvX1rrop3vZ2ns3n9PO6BmF0NwZWstBSXETB36vyEbO5kgMuAbqqH4aXhmdHFk1 LK6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5lHMCJaRJ2z2Of4cHm0Z55ECc5kWoluL46dtbgmm3tA=; b=A1MJwU5Ak0SCD28e4mEz4uyCwpePFy8Fc/1pu0py1MVMKSJRXTz6adYS44J6pEV23R SV68kA+9y6gfPge89S+kMBzZvmeJkRvlrlD1FvDe/seyeJddcOzODjT8i9OLvEUl9dPI CaA/bQUZjKcRj+k1f26ByQ3D10Cw6tiJ287Ra1927fqFoX+oD3kqiQwmkDVxDStuMzUh cuKa5votAWut5shn7cV2l17gOShL2XZFZmkImI1yE7hrQeouNztvIBn7vmGhYw09U+/O ovoyPrqbVnN6eFimXS13CVRvlaKrggoQDr2ztozWRCEv4pRiYb6CRWynbpECS30VBe1X WSCw== X-Gm-Message-State: ALoCoQnM/mBplysZPU45zQl/iVBdsqrBph/2DKTyfP2BA3W5D/QGoIp/l6XM/l4KEDLCMAZgEk0bQeZy4YWA1LqUjhgAtY7Q/Q== X-Received: by 10.98.14.129 with SMTP id 1mr14384128pfo.161.1449683361351; Wed, 09 Dec 2015 09:49:21 -0800 (PST) Received: from yshi-Precision-T5600.corp.ad.wrs.com (unknown-216-82.windriver.com. [147.11.216.82]) by smtp.gmail.com with ESMTPSA id l20sm13049117pfi.10.2015.12.09.09.49.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Dec 2015 09:49:20 -0800 (PST) From: Yang Shi To: akpm@linux-foundation.org, rostedt@goodmis.org, mingo@redhat.com Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linaro-kernel@lists.linaro.org, yang.shi@linaro.org, Thomas Gleixner , "H. Peter Anvin" , x86@kernel.org Subject: [PATCH v4 3/7] x86: mm/gup: add gup trace points Date: Wed, 9 Dec 2015 09:29:20 -0800 Message-Id: <1449682164-9933-4-git-send-email-yang.shi@linaro.org> X-Mailer: git-send-email 2.0.2 In-Reply-To: <1449682164-9933-1-git-send-email-yang.shi@linaro.org> References: <1449682164-9933-1-git-send-email-yang.shi@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x86@kernel.org Signed-off-by: Yang Shi --- arch/x86/mm/gup.c | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.0.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/arch/x86/mm/gup.c b/arch/x86/mm/gup.c index ae9a37b..a96bcb7 100644 --- a/arch/x86/mm/gup.c +++ b/arch/x86/mm/gup.c @@ -12,6 +12,9 @@ #include +#define CREATE_TRACE_POINTS +#include > + static inline pte_t gup_get_pte(pte_t *ptep) { #ifndef CONFIG_X86_PAE @@ -270,6 +273,8 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write, (void __user *)start, len))) return 0; + trace_gup_get_user_pages_fast(start, nr_pages); + /* * XXX: batch / limit 'nr', to avoid large irq off latency * needs some instrumenting to determine the common sizes used by @@ -373,6 +378,8 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write, } while (pgdp++, addr = next, addr != end); local_irq_enable(); + trace_gup_get_user_pages_fast(start, nr_pages); + VM_BUG_ON(nr != (end - start) >> PAGE_SHIFT); return nr;