From patchwork Wed Dec 9 21:22:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Shi X-Patchwork-Id: 58187 Delivered-To: patch@linaro.org Received: by 10.112.147.194 with SMTP id tm2csp107493lbb; Wed, 9 Dec 2015 13:44:15 -0800 (PST) X-Received: by 10.98.1.140 with SMTP id 134mr1635210pfb.134.1449697455281; Wed, 09 Dec 2015 13:44:15 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x22si15163506pfi.55.2015.12.09.13.44.14; Wed, 09 Dec 2015 13:44:15 -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 S1753532AbbLIVnl (ORCPT + 28 others); Wed, 9 Dec 2015 16:43:41 -0500 Received: from mail-pa0-f52.google.com ([209.85.220.52]:32786 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752574AbbLIVmY (ORCPT ); Wed, 9 Dec 2015 16:42:24 -0500 Received: by pabur14 with SMTP id ur14so35922766pab.0 for ; Wed, 09 Dec 2015 13:42:24 -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=r8g41+VnGWp3Lb3OaMHQ8dupn7tJmDIISCXrMXVr0L4=; b=JLgF9/NTsPmOdg1qkMMLnRjuyb0EuGIIR79woi3iQ+M0xZE3fbdJONNlysi8EM2Lt+ Edoeh2AepEtwoKJH/WSRAqofJKsSMdfOraJssqs4cHoQfQEmINm2TnJUdKTPizjddCRj sXdp51XH/sEwJedhO45l/0XboNt+mGHC4nsYiIOlAPNEdG6xAt0LVl5iYdid5lFhQJO4 JoiqbJg1pBGPKHyGCtOYay3pKb/Y6LrEbRmgqt0W45XAszRFXnMaq5eQb11VZd3IYvWe iDpmD+2wl7tbQxEWQR76S2pFPDAWRRPGPBRplyWRtRG7cZKWj8OMyHPmqgnqlzX22Nex 3DHA== 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=r8g41+VnGWp3Lb3OaMHQ8dupn7tJmDIISCXrMXVr0L4=; b=Ou5EWA5U1lu2FCXMoamYalEGcDqzm7SRj3Nr8Bko7adx71SaxylH8bQY2LSRECul0C i2V+J/+aPVH3wUTigOy2zo0YyoU55BbTVyBoKq726gamRzSmWxkg/QQaF6tITt3VZ337 zFpMFlp3/E5R4//MFoQ91vXmKeky1mHt6pEV3yIiZOMTUSVxc4AmkG+XkDRJNRUUGgrz 5+Q6pYqkNQLLq2y766gsOF2+uI33C65kL8lLpkwiJXYmNGVwCy84IiT9QIL7TKHJ2WQK S+oMo+2PItzzxNk0cl1pU7ptccM2OzgNe7YCijKfTTZNwJZCzY7XFkABKfYCpzo1nzZr W1VA== X-Gm-Message-State: ALoCoQkuMiCAQ8TigU90OZiNmSG1YN+STmyfxWCG6KU4KId79MyoKj8IOnD2Wlx6M2iaN5Ve0VWjakmWyMoilAmPqo6lLm/1mA== X-Received: by 10.66.119.202 with SMTP id kw10mr11398651pab.49.1449697344232; Wed, 09 Dec 2015 13:42:24 -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 f76sm13717090pfd.49.2015.12.09.13.42.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Dec 2015 13:42:23 -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 v5 3/7] x86: mm/gup: add gup trace points Date: Wed, 9 Dec 2015 13:22:27 -0800 Message-Id: <1449696151-4195-4-git-send-email-yang.shi@linaro.org> X-Mailer: git-send-email 2.0.2 In-Reply-To: <1449696151-4195-1-git-send-email-yang.shi@linaro.org> References: <1449696151-4195-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 | 6 ++++++ 1 file changed, 6 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..df5f3ab 100644 --- a/arch/x86/mm/gup.c +++ b/arch/x86/mm/gup.c @@ -12,6 +12,8 @@ #include +#include + static inline pte_t gup_get_pte(pte_t *ptep) { #ifndef CONFIG_X86_PAE @@ -270,6 +272,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 +377,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;