Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp3312410pxx; Mon, 2 Nov 2020 05:51:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJzzgUgcVKBvfBJEjz9Li3zZB5wuifiClfaJ0cKzN4LUR5zTMn+MVeG33m1JbA0fWg0+EQnJ X-Received: by 2002:a17:906:82d9:: with SMTP id a25mr11717778ejy.101.1604325113239; Mon, 02 Nov 2020 05:51:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604325113; cv=none; d=google.com; s=arc-20160816; b=0zCfUBPd7I3oMpSbdjKbdlVwKvx7l2yT8Dz25/ydPi+oWx8aCRr+FJ4MSyl4CqN8He XXWS+FBuP0JTivUz8/X3hfEUp5omKGIr39bpKFUrjehhBQiwot3kVhYGHWeEEnBp5WeW vTUjWlcCH0iquQYtHj5VG751NexRkmq55ByN86Q73QLogc05MaCaEW+qIEWYztspmmpJ idhMJyTAHmNs610laUSVU4jy4PhPO+6bcG73p3nQDiWUPX7Jlpfd6nrQ2mK3jgBnFjdA deZQqXSbg7RZx1PzyMqYfgMjFihoyCnzqHsOg6OWnbbQxAQ5Z+5Cu7q9D6xwpUrejJw1 33rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=A5QAluO9jJjtQ1kbWIac7ykdsGFp0O5j0QiLabMsVe8=; b=JrK0laEsJw3GQOiLrJRLYjiEt0zEHPyAJPbuodx2h+mXFzWXgVZ/zUYYHVZO1FQJ8I WEh576kth9VAI3/Ebp8vEYGLK/+/4ZaX9LgGTpjBms2KbGFZK/hXpL60d/f7KK/iYqNf NCXWiccd4R6QjxCpCCxdtAd8jAJoRLfhZgPcCLGTF3udsd2sc9VSF5alwTrJhb/EhJcQ MweRPGZr0M9di6pL0nmtUFlNe2NpZLAKAqeNnYZQJK+HbW6qpNG6LG6p6UbI8LaXEWkF /nHkHpmHfsdj0y5EqgiHb0fNaja0e+N5qsfUInQvA4/ruCG7IS+QATBlKNfGWiKAow00 FW6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=i2IQmrHk; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ec18si11045166ejb.679.2020.11.02.05.51.21; Mon, 02 Nov 2020 05:51:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=i2IQmrHk; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726015AbgKBNvN (ORCPT + 99 others); Mon, 2 Nov 2020 08:51:13 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:34896 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725975AbgKBNuX (ORCPT ); Mon, 2 Nov 2020 08:50:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604325022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:in-reply-to:in-reply-to:references:references; bh=A5QAluO9jJjtQ1kbWIac7ykdsGFp0O5j0QiLabMsVe8=; b=i2IQmrHkmvam9nHLZfgKp0fGxK4Irli8Ua8e1Ta1UYBw8Q7ym1Z2Toiehj/Qs3nOt8gLbu TsbK7bkB7Ydg0iP9MM2wBDhxVIY0HwjjrYf/N3mzMZDq6iQtjJf54vYxvg08KntP7dLqJE hxTKXJLAMURggcn23H+u5sduF1I2V/o= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-381-vPWh2UqRN8q4CSiGzlSgpA-1; Mon, 02 Nov 2020 08:50:20 -0500 X-MC-Unique: vPWh2UqRN8q4CSiGzlSgpA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DFE361099F7D; Mon, 2 Nov 2020 13:50:18 +0000 (UTC) Received: from dwysocha.rdu.csb (ovpn-113-255.rdu2.redhat.com [10.10.113.255]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 832235D9DD; Mon, 2 Nov 2020 13:50:18 +0000 (UTC) From: Dave Wysochanski To: Trond Myklebust , Anna Schumaker Cc: linux-nfs@vger.kernel.org Subject: [PATCH 10/11] NFS: Add page_index to nfs_readdir enter and exit tracepoints Date: Mon, 2 Nov 2020 08:50:10 -0500 Message-Id: <1604325011-29427-11-git-send-email-dwysocha@redhat.com> In-Reply-To: <1604325011-29427-1-git-send-email-dwysocha@redhat.com> References: <1604325011-29427-1-git-send-email-dwysocha@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Add nfs_open_dir_context.page_index to enter and exit tracepoints since this affects searching the cache. Signed-off-by: Dave Wysochanski --- fs/nfs/dir.c | 2 ++ fs/nfs/nfstrace.h | 22 ++++++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index b266f505b521..cbd74cbdbb9f 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -894,6 +894,7 @@ static int nfs_readdir(struct file *file, struct dir_context *ctx) nfs_inc_stats(inode, NFSIOS_VFSGETDENTS); trace_nfs_readdir_enter(inode, ctx->pos, dir_ctx->dir_cookie, + dir_ctx->page_index, NFS_SERVER(inode)->dtsize, my_desc.plus); /* @@ -943,6 +944,7 @@ static int nfs_readdir(struct file *file, struct dir_context *ctx) res = 0; dir_ctx->page_index = desc->page_index; trace_nfs_readdir_exit(inode, ctx->pos, dir_ctx->dir_cookie, + dir_ctx->page_index, NFS_SERVER(inode)->dtsize, my_desc.plus, res); return res; } diff --git a/fs/nfs/nfstrace.h b/fs/nfs/nfstrace.h index 06b301da85a2..12869b0c3f70 100644 --- a/fs/nfs/nfstrace.h +++ b/fs/nfs/nfstrace.h @@ -754,11 +754,12 @@ const struct inode *inode, u64 cookie, u64 dir_cookie, + unsigned long page_index, unsigned int count, bool plus ), - TP_ARGS(inode, cookie, dir_cookie, count, plus), + TP_ARGS(inode, cookie, dir_cookie, page_index, count, plus), TP_STRUCT__entry( __field(dev_t, dev) @@ -766,6 +767,7 @@ __field(u64, fileid) __field(u64, cookie) __field(u64, dir_cookie) + __field(unsigned long, page_index) __field(u64, count) __field(bool, plus) ), @@ -776,15 +778,16 @@ __entry->fhandle = nfs_fhandle_hash(NFS_FH(inode)); __entry->cookie = cookie; __entry->dir_cookie = dir_cookie; + __entry->page_index = page_index; __entry->count = count; __entry->plus = plus; ), TP_printk( - "fileid=%02x:%02x:%llu fhandle=0x%08x cookie=0x%08llx dir_cookie=0x%08llx count=%llu plus=%s", + "fileid=%02x:%02x:%llu fhandle=0x%08x cookie=0x%08llx dir_cookie=0x%08llx page_index=0x%08lx count=%llu plus=%s", MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long long)__entry->fileid, - __entry->fhandle, __entry->cookie, __entry->dir_cookie, + (unsigned long long)__entry->fileid, __entry->fhandle, + __entry->cookie, __entry->dir_cookie, __entry->page_index, __entry->count, __entry->plus ? "true" : "false" ) ); @@ -794,12 +797,13 @@ const struct inode *inode, u64 cookie, u64 dir_cookie, + unsigned long page_index, unsigned int count, bool plus, int error ), - TP_ARGS(inode, cookie, dir_cookie, count, plus, error), + TP_ARGS(inode, cookie, dir_cookie, page_index, count, plus, error), TP_STRUCT__entry( __field(dev_t, dev) @@ -808,6 +812,7 @@ __field(unsigned long, error) __field(u64, cookie) __field(u64, dir_cookie) + __field(unsigned long, page_index) __field(u64, count) __field(bool, plus) ), @@ -819,16 +824,17 @@ __entry->error = error; __entry->cookie = cookie; __entry->dir_cookie = dir_cookie; + __entry->page_index = page_index; __entry->count = count; __entry->plus = plus; ), TP_printk( - "error=%ld fileid=%02x:%02x:%llu fhandle=0x%08x cookie=0x%08llx dir_cookie=0x%08llx count=%llu plus=%s", + "error=%ld fileid=%02x:%02x:%llu fhandle=0x%08x cookie=0x%08llx dir_cookie=0x%08llx page_index=0x%08lx count=%llu plus=%s", __entry->error, MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long long)__entry->fileid, - __entry->fhandle, __entry->cookie, __entry->dir_cookie, + (unsigned long long)__entry->fileid, __entry->fhandle, + __entry->cookie, __entry->dir_cookie, __entry->page_index, __entry->count, __entry->plus ? "true" : "false" ) ); -- 1.8.3.1