From patchwork Wed Dec 9 21:22:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Shi X-Patchwork-Id: 58186 Delivered-To: patch@linaro.org Received: by 10.112.147.194 with SMTP id tm2csp107378lbb; Wed, 9 Dec 2015 13:43:59 -0800 (PST) X-Received: by 10.98.15.76 with SMTP id x73mr1598539pfi.81.1449697439505; Wed, 09 Dec 2015 13:43:59 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qj4si15127430pac.33.2015.12.09.13.43.58; Wed, 09 Dec 2015 13:43:59 -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 S1753576AbbLIVnm (ORCPT + 28 others); Wed, 9 Dec 2015 16:43:42 -0500 Received: from mail-pa0-f46.google.com ([209.85.220.46]:34301 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752569AbbLIVmX (ORCPT ); Wed, 9 Dec 2015 16:42:23 -0500 Received: by pacwq6 with SMTP id wq6so35723522pac.1 for ; Wed, 09 Dec 2015 13:42:23 -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=b8Wv+STEmnKY0AHgjVvlAoZ1UkyTR0fF5I+3a8Oq29s=; b=uz8JmN7G8cXoRqJVVgJHeJqOnW7Hq3A/FA8VzWz9VNtaBhKZaHHGp3pRPbLyBiSbq8 SLpKPL2IsXhde0IqMPLpSEsPsZIB7mrdsKVM9iqYR2f7IYP+VEjAKLsFPTGOIZYme+iZ CiGjD+Oo5sjuJvkFx+0gHO+ewC51DDSX6t4XjMqGi8JdZSWam0Rj4KbZqFKaF0UJiIy2 kn15y/X9xTvPQvvcPojN2X+bkfNEJgGS/K37cOvLFoZfNPVANeH+6q3cq/yILiyyXjRR C16bYtJn70GMLCNWIeyCZb4Fz6yjnBS7RXGzZrhsyIffdBBJAnAQp4WKnYlbNJNQCJ76 tcfg== 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=b8Wv+STEmnKY0AHgjVvlAoZ1UkyTR0fF5I+3a8Oq29s=; b=e4fxdE6/1dimlLe0/G14Esy3QsXD/1k+IP01+mzugi7NjG/VlRWy/Xp4SH7ERf7WQY sNBs2f53ohxm14/JKsQ1Dt4Hz4jyi7vyamH2/wD4Mq4Q8Q/Abb/oBTGInR/0Pz+0fTdq Lcoe9Vd+T5I/FoeeFi+O+2bvwXsVoVNpCfLDWeU4/PzzQd2/JxERY9mImO0YdH4ejwTh 1ASYCSB9xxkNx671v1ipY2FglSOPcMy0CewM2TMoVXQy7+e2dXfjuS+rjpkqHy2sCX0r 624HpM+4bLhaIw1QrxMhXrYgOuP/i4bp9XwhyMhSV2WdMyGoM68JcOOX0pIHvdjhpL8K kywQ== X-Gm-Message-State: ALoCoQkkq0NkVKuobnvr08fBDA4gXrxiKbEhRS/B0YZeYWAGBNrzfPCsVXD6/eqZmXWfGMsS1NjVjzrkexQRodrMUjVLjH485w== X-Received: by 10.66.102.70 with SMTP id fm6mr11459014pab.80.1449697343237; Wed, 09 Dec 2015 13:42:23 -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.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Dec 2015 13:42: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 v5 2/7] mm/gup: add gup trace points Date: Wed, 9 Dec 2015 13:22:26 -0800 Message-Id: <1449696151-4195-3-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 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..00a3cff 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -18,6 +18,9 @@ #include "internal.h" +#define CREATE_TRACE_POINTS +#include + static struct page *no_page_table(struct vm_area_struct *vma, unsigned int flags) { @@ -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(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(address); 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); + /* * Disable interrupts. We use the nested form as we can already have * interrupts disabled by get_futex_key.