From patchwork Tue Dec 8 19:39:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Shi X-Patchwork-Id: 57900 Delivered-To: patch@linaro.org Received: by 10.112.147.194 with SMTP id tm2csp244327lbb; Tue, 8 Dec 2015 12:01:50 -0800 (PST) X-Received: by 10.98.16.200 with SMTP id 69mr7530312pfq.98.1449604910408; Tue, 08 Dec 2015 12:01:50 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xt4si3614597pab.131.2015.12.08.12.01.47; Tue, 08 Dec 2015 12:01:50 -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 S1752764AbbLHUBp (ORCPT + 28 others); Tue, 8 Dec 2015 15:01:45 -0500 Received: from mail-pf0-f172.google.com ([209.85.192.172]:35059 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752410AbbLHT74 (ORCPT ); Tue, 8 Dec 2015 14:59:56 -0500 Received: by pfu207 with SMTP id 207so17043804pfu.2 for ; Tue, 08 Dec 2015 11:59:56 -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=DQN3sXt2UrSSVLO8RjZtBhaq24PdsF9XidPS4sJXieU=; b=WKl7RvB+qe5YEwGJZDVfr9I5oU7ki+/CpNWOEsRubJljiu+WlttyDCUbcErkToyNuD +713AteAuHfvhhEwburZ/ykmbmiufuE5FKt41ay2w2mrTxGoFWlIz1O04SNf75iOsnvH rKzbmPZebnJ8bXp2q/VnoArLO2IZml5D0LzdCziw3Jx1zhfH4p9+H9TtCRebP+sxdcnl AYjwHW1A3XorSTZr15pqj+3bphDBG0gwBHDjtqbZImD7YhUXS7JaW6zfcD3pp+cRQi80 nj2vczuBCWLt9rHvylBt7aI+6xmAfA3ELonYLl/VR/LZU3glKaC1Dw+eFHQSGird5uIN Wz/Q== 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=DQN3sXt2UrSSVLO8RjZtBhaq24PdsF9XidPS4sJXieU=; b=Oq7QmVz0rqRG3mYjekzdVK4gr+MiLh7X5UrNdekg1yJAwKKKwrgc6u0Py/Rnf4oDKu Gs6K6O8fHGn1iglKsl0CYLQN+hDhBUJhetsiqv/bB0cJKIK7PLiASqQTGvIKsSYAxgOJ 3PmnldzXTeM49uj+5FG8nGzNT+tSjqFsEpmDaxTLkmuydmQEhGAAyPLmh+1JoYZrpbbv VPsbm0zkvTCN1WZiv35Of8LV94QvRokCrijLOTorWpBjO7IXKal4brz6VCWbvxttzrDL idTHYScjvfo68KSvQ6YwHPkmbK2NZ4Zdm3lJa/OMr72SVeYPX8+YUeQnjcZEwq+2fplf CeMQ== X-Gm-Message-State: ALoCoQk/pJFy24ctHnmJa+zS5BRSdWs23xekOvu8T5a7CczVjKE3kZvziUYVvHkWMUk8JuXM5HJyxo0Hrvsit3+JPa6crDd9Ag== X-Received: by 10.98.86.132 with SMTP id h4mr7491277pfj.121.1449604796394; Tue, 08 Dec 2015 11:59:56 -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 25sm6479658pfp.62.2015.12.08.11.59.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Dec 2015 11:59:55 -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 v3 3/7] x86: mm/gup: add gup trace points Date: Tue, 8 Dec 2015 11:39:51 -0800 Message-Id: <1449603595-718-4-git-send-email-yang.shi@linaro.org> X-Mailer: git-send-email 2.0.2 In-Reply-To: <1449603595-718-1-git-send-email-yang.shi@linaro.org> References: <1449603595-718-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..081f69d 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, (unsigned long) 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, (unsigned long) nr_pages); + VM_BUG_ON(nr != (end - start) >> PAGE_SHIFT); return nr;