From patchwork Wed Dec 2 22:53:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Shi X-Patchwork-Id: 57587 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp3175460lbb; Wed, 2 Dec 2015 15:15:05 -0800 (PST) X-Received: by 10.66.222.101 with SMTP id ql5mr8654663pac.144.1449098104824; Wed, 02 Dec 2015 15:15:04 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n1si7546375pap.152.2015.12.02.15.15.04; Wed, 02 Dec 2015 15:15:04 -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 S1758774AbbLBXPA (ORCPT + 28 others); Wed, 2 Dec 2015 18:15:00 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:33219 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757307AbbLBXNX (ORCPT ); Wed, 2 Dec 2015 18:13:23 -0500 Received: by pabfh17 with SMTP id fh17so55173951pab.0 for ; Wed, 02 Dec 2015 15:13:22 -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=MTIwpw5WzjnFcgUFVg+m5n5eZAHCtusBnxnkZlHSvcc=; b=Nyg7WK0z0EHbDtKYs+TeKpR0o7SKyFH1BVNJ4U2AitD/3mDPtsu0T1GM0L5ZemAP+r VID/XjnmGrLNKQ4J4ulCKseqbCqLan0GnoOxQ1Qk+3B1WbwmtVUustzFFtQxrZ/pABtL fuy6uA9qefjIDlNIC6MS2BLE+PIxHkCShzQXqXuWT9B2klC+HyTgCmlMMhBmnqItXZ6G ZlUxrSSIFTzl7ts5sv01AfQBeJ3reb7UzOJ59O701qeorxkWP65hPGWbu0AjGyJyozFs 5jn+mwiVyHASgiaikan9soBC8lRj2Xc/pMtk9QFASkmWgVtVGoENqt2ru9g3QUvce5Kw 4XfA== 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=MTIwpw5WzjnFcgUFVg+m5n5eZAHCtusBnxnkZlHSvcc=; b=frDFsu6DpPp5qpQFtUJrXdO8Phxcy2u59S7VBOoeiRxSIfS8eeqi8VXrzNRS2zEq1K QKK3KPoztEMahDSH/NCfIyDDVXekhCeJnowsgk1mqB6ZhvMqWy/RieEaact7qJgljny+ Amkwd0ebn8uFPRlo8GL7hDK7WND1oIL9qx7JsjBn6EWXmT5xTzdl/qIGZeJhFrKKOcqP GCLXhOjG0/Rcc+CI9CfJxSrTalfc4QzVVAjzxsg3kQRU7bZXFbWHF2kU3/P0F1mHV564 O1j+waPIA9onQ1V6VzzUwGoyd0Gm2dUE4n7ZRIreBlh2TfoeAd/9ldbNfQ+8xg0SKfy8 yHLA== X-Gm-Message-State: ALoCoQkLSL2IdAf2LMEVls7kFZbJuFIiM89VFAuAbxzw1c2hIclO5m9wQsa1O/5aHl9uov7khKex X-Received: by 10.66.102.97 with SMTP id fn1mr8607962pab.131.1449098002717; Wed, 02 Dec 2015 15:13:22 -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 ga13sm6429030pac.47.2015.12.02.15.13.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Dec 2015 15:13:22 -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 V2 2/7] mm/gup: add gup trace points Date: Wed, 2 Dec 2015 14:53:28 -0800 Message-Id: <1449096813-22436-3-git-send-email-yang.shi@linaro.org> X-Mailer: git-send-email 2.0.2 In-Reply-To: <1449096813-22436-1-git-send-email-yang.shi@linaro.org> References: <1449096813-22436-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..10245a4 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); + 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.