Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp319297ybn; Tue, 1 Oct 2019 21:44:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqzpI/Y98pclwDqQ/PVlj9uPX0/czBVsYRWfKV4urA5bGGXMlaXstEGNBZDHsgLAA7v0Zthj X-Received: by 2002:a17:906:255b:: with SMTP id j27mr1414409ejb.96.1569991464925; Tue, 01 Oct 2019 21:44:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569991464; cv=none; d=google.com; s=arc-20160816; b=TtlpDgwKvbLQJqg6tfwd6+PsZ7N+gdvLnyW/2Pzo2E51M97E/cf1rENisrNrnu43IE PVUY6n9ofi8sjP78vjiDct3OWH1DX1cdVLabvmeZhZQKj/IUMFD9sAnIlk9cYeg+TMy/ Ip41f46xCMlQ5JHd+TPW/ne3IaaWIL71v4nXOSvbE9tvH67Tudwb6gqpq0TlTv9Vb8+n cn3gPcvyOj4AjCMr11Vlp4gJPY0iX5j62Tamjs/CfkyPtcGmrtm2hw3q618Z6lphK7Ui TREz8TkK8Zn0+coe8FbA1flxlofKqcUhUlV+lF8ux029aBzxQ/jgzIoS3GzwzUrKJpst DdGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=LSuVeD78YGQTVaM+QiDXfwCHERay2Z2fUzD7YJHLx24=; b=fsIMYCcxuR2AnG+SjVyyvbJfgQ+GDfHUmow2ZL2IM5uz2AWlHNWHw7rfcqmYw1cq/P diRAmpPDeghxbsxKQ1/niTGFE+r8aUSpJBspN6NUn7TQFOz8Qm3lLI5M7a1ORECTOIFG nDrhf0Kt3zWRr4faCaeg33dyQb1tM8Y5O7jcdManunz7Ih9QN42iUsSeQkcdUB+oScaE 0FMPU5nedLCtXcy48NsP+OwuK7wqnoxfpoB7twbUZQOYCw39S9VOm6O821JNXHgOyxMv ceaSxbBK6IyAo8Z3eTwVdABlQ5Vi4CX9/k9sp9Y94q7ygVYnUvMgXy4WJmATt83E96AD Si1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=BKq6QhZE; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pj21si9834694ejb.64.2019.10.01.21.44.00; Tue, 01 Oct 2019 21:44:24 -0700 (PDT) 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; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=BKq6QhZE; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727450AbfJAUwp (ORCPT + 99 others); Tue, 1 Oct 2019 16:52:45 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:45358 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725942AbfJAUwo (ORCPT ); Tue, 1 Oct 2019 16:52:44 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x91KmdUj026721; Tue, 1 Oct 2019 20:52:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2019-08-05; bh=LSuVeD78YGQTVaM+QiDXfwCHERay2Z2fUzD7YJHLx24=; b=BKq6QhZEx+qWDpDJxOdPnDvNAQpsdJuV16ntvPqhTOzZH3URn9hS5KvTEwENjNydbtDF nvta0ioJhJ+206FjROnZFZzS36j8Ne8OLxHNhCuhP1mYohZd2Tn+XmS1HXeEdOk4/fCB mmG26frLdp9pfnXd39VJz2RzZ7AYwt0ibwixUMgSyzmJAV1BXpY3Qke+g44SNso3oKtv Oi8KNjPNxInSaIPQaedQJL93kSWgrvX1IVp1VT5Iz9Y6ALIvYndLToUNROuzZl+vnYkA CMqFMP0MgLSoujh0sT3o1WLqTrJOo4TNyu80fkWSaRhOEA/p7aSseeXIow/CeDETR4oi ZA== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by aserp2120.oracle.com with ESMTP id 2v9yfq8xkj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 01 Oct 2019 20:52:29 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x91KnIiv084672; Tue, 1 Oct 2019 20:52:29 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3020.oracle.com with ESMTP id 2vbqd1gwtj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 01 Oct 2019 20:52:29 +0000 Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x91KqPPP031464; Tue, 1 Oct 2019 20:52:25 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 01 Oct 2019 13:52:25 -0700 Date: Tue, 1 Oct 2019 13:52:24 -0700 From: "Darrick J. Wong" To: Christoph Hellwig Cc: Damien Le Moal , Andreas Gruenbacher , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 01/11] iomap: add tracing for the readpage / readpages Message-ID: <20191001205224.GG13108@magnolia> References: <20191001071152.24403-1-hch@lst.de> <20191001071152.24403-2-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191001071152.24403-2-hch@lst.de> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9397 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910010172 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9397 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910010172 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 01, 2019 at 09:11:42AM +0200, Christoph Hellwig wrote: > Lift the xfs code for tracing address space operations to the iomap > layer. > > Signed-off-by: Christoph Hellwig > --- > fs/iomap/buffered-io.c | 7 +++++++ > include/trace/events/iomap.h | 27 +++++++++++++++++++++++++++ > 2 files changed, 34 insertions(+) > create mode 100644 include/trace/events/iomap.h > > diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c > index e25901ae3ff4..099daf0c09b8 100644 > --- a/fs/iomap/buffered-io.c > +++ b/fs/iomap/buffered-io.c > @@ -19,6 +19,9 @@ > > #include "../internal.h" > > +#define CREATE_TRACE_POINTS > +#include > + /me wonders if we really ought to be creating the tracepoints in buffered-io.c, though I guess it does seem a little silly to have a fs/iomap/trace.c just for these two lines... --D > static struct iomap_page * > iomap_page_create(struct inode *inode, struct page *page) > { > @@ -293,6 +296,8 @@ iomap_readpage(struct page *page, const struct iomap_ops *ops) > unsigned poff; > loff_t ret; > > + trace_iomap_readpage(page->mapping->host, 1); > + > for (poff = 0; poff < PAGE_SIZE; poff += ret) { > ret = iomap_apply(inode, page_offset(page) + poff, > PAGE_SIZE - poff, 0, ops, &ctx, > @@ -389,6 +394,8 @@ iomap_readpages(struct address_space *mapping, struct list_head *pages, > loff_t last = page_offset(list_entry(pages->next, struct page, lru)); > loff_t length = last - pos + PAGE_SIZE, ret = 0; > > + trace_iomap_readpages(mapping->host, nr_pages); > + > while (length > 0) { > ret = iomap_apply(mapping->host, pos, length, 0, ops, > &ctx, iomap_readpages_actor); > diff --git a/include/trace/events/iomap.h b/include/trace/events/iomap.h > new file mode 100644 > index 000000000000..7d2fe2c773f3 > --- /dev/null > +++ b/include/trace/events/iomap.h > @@ -0,0 +1,27 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * Copyright (c) 2009-2019, Christoph Hellwig > + * All Rights Reserved. > + * > + * NOTE: none of these tracepoints shall be consider a stable kernel ABI > + * as they can change at any time. > + */ > +#undef TRACE_SYSTEM > +#define TRACE_SYSTEM iomap > + > +#if !defined(_TRACE_IOMAP_H) || defined(TRACE_HEADER_MULTI_READ) > +#define _TRACE_IOMAP_H > + > +#include > + > +#define DEFINE_READPAGE_EVENT(name) \ > +DEFINE_EVENT(iomap_readpage_class, name, \ > + TP_PROTO(struct inode *inode, int nr_pages), \ > + TP_ARGS(inode, nr_pages)) > +DEFINE_READPAGE_EVENT(iomap_readpage); > +DEFINE_READPAGE_EVENT(iomap_readpages); > + > +#endif /* _TRACE_IOMAP_H */ > + > +/* This part must be outside protection */ > +#include > -- > 2.20.1 >