From patchwork Tue Dec 1 23:06:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Shi X-Patchwork-Id: 57526 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp2518200lbb; Tue, 1 Dec 2015 15:27:17 -0800 (PST) X-Received: by 10.98.1.207 with SMTP id 198mr158875pfb.10.1449012436987; Tue, 01 Dec 2015 15:27:16 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ww1si215879pab.181.2015.12.01.15.27.16; Tue, 01 Dec 2015 15:27:16 -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 S932206AbbLAX1L (ORCPT + 28 others); Tue, 1 Dec 2015 18:27:11 -0500 Received: from mail-pa0-f47.google.com ([209.85.220.47]:35821 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757303AbbLAX0C (ORCPT ); Tue, 1 Dec 2015 18:26:02 -0500 Received: by pacej9 with SMTP id ej9so19929500pac.2 for ; Tue, 01 Dec 2015 15:26:01 -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=057ORcMpVYptlt9migHyiiQ0JCJVsgERjG/g2aHPPFQ=; b=aMO1SDBMV9wAkJ6+UJoDcyovty4BcNQ1sd3gLK2GMlpyKoFXamzkTFj74XLiKBg3G8 KtEOCLjfqUxSLr9QqWwSMSr6COJa2XNge5XARXDDbbDUvzaJxdwq8z6RH6CLPRH3DvNZ Xl643r+zDakR62N8m8b6qMVNbVsBk6gnV6QBXFXQGmYKUwPNHKmiBRjq5WxdPUWEiqF5 xAv3kuAmqSShfKjxogE07OlriY/8Y9RHg1VGRMmZEGZT7HK0yepXTtODGUVKoZSODyCc xoBggmOZ2qUkXjGrz6Kkq29CCndAhnecZ69cxxnWzrm+wdbXuPGPdxyz8r82CViU0lzs oaMw== 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=057ORcMpVYptlt9migHyiiQ0JCJVsgERjG/g2aHPPFQ=; b=LZjix8aViDvUB79KBdT+oh2oFvaNAdlPK/YTeZe4BGrRc75fsl+d7aO6ozpKrODsEm k0o2ZVmM8zbgtEgl/1vTsuL8rjtpmto0MbYZBm7qh+4n1pX3WqOqtHRv7clVy1IMOh2A +Y+YNUE7l7yt5WVB3ptc0hZdr1kNehLVf6ZgU+Gm4rxPa4Db1ayQEVwP5/1KNbnvSnIn n6M20JN0sSqIK7kl8kimZlKN+8HAU3CruqLWwfm8H+IDwT0UTVkdoUyvNixq0EKoZK+4 HBm08kWk/PrdwriA8948DiaOJ9M4MxtDoVTUJQuGD/w+zkMDi6Uqo2QKqWjCR/dkk1g5 tKIw== X-Gm-Message-State: ALoCoQmSPSz6kmzbfpROZHQJDCrPdnR2CNCzChdBbPCGick9g1lmzUdggmlBIX0zhIuMyYtckSHb X-Received: by 10.66.240.4 with SMTP id vw4mr85389pac.9.1449012361870; Tue, 01 Dec 2015 15:26:01 -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 sz9sm108777pab.13.2015.12.01.15.26.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Dec 2015 15:26:01 -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 Subject: [PATCH 2/7] mm/gup: add gup trace points Date: Tue, 1 Dec 2015 15:06:12 -0800 Message-Id: <1449011177-30686-3-git-send-email-yang.shi@linaro.org> X-Mailer: git-send-email 2.0.2 In-Reply-To: <1449011177-30686-1-git-send-email-yang.shi@linaro.org> References: <1449011177-30686-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 For slow version, just add trace point for raw __get_user_pages since all slow variants call it to do the real work finally. Signed-off-by: Yang Shi --- mm/gup.c | 8 ++++++++ 1 file changed, 8 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/mm/gup.c b/mm/gup.c index deafa2c..72de7af 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -13,6 +13,9 @@ #include #include +#define CREATE_TRACE_POINTS +#include + #include #include @@ -462,6 +465,8 @@ long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm, if (!nr_pages) return 0; + trace_gup_get_user_pages(tsk, mm, start, nr_pages, gup_flags, + pages, vmas, nonblocking); VM_BUG_ON(!!pages != !!(gup_flags & FOLL_GET)); /* @@ -599,6 +604,7 @@ int fixup_user_fault(struct task_struct *tsk, struct mm_struct *mm, if (!(vm_flags & vma->vm_flags)) return -EFAULT; + trace_gup_fixup_user_fault(tsk, mm, address, fault_flags); ret = handle_mm_fault(mm, vma, address, fault_flags); if (ret & VM_FAULT_ERROR) { if (ret & VM_FAULT_OOM) @@ -1340,6 +1346,8 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write, start, len))) return 0; + trace_gup_get_user_pages_fast(start, nr_pages, write, pages); + /* * Disable interrupts. We use the nested form as we can already have * interrupts disabled by get_futex_key.