From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] mm: trace filemap add and del
Date: Wed, 21 Nov 2012 11:36:09 +0100 [thread overview]
Message-ID: <87sj835jl2.fsf@free.fr> (raw)
In-Reply-To: <20121120155735.905bbf9e.akpm@linux-foundation.org> (Andrew Morton's message of "Tue, 20 Nov 2012 15:57:35 -0800")
Andrew Morton <akpm@linux-foundation.org> writes:
>> + TP_STRUCT__entry(
>> + __field(struct page *, page)
>> + __field(unsigned long, i_no)
>
> May as well call this i_ino - there's little benefit in using a
> different identifier.
Agreed for patch V2.
>
>> + __field(unsigned long, pageofs)
>
> "index".
Agreed for patch V2.
>
>> + __field(dev_t, s_dev)
>
> Perhaps use super_block.s_id here
If you imply by that that dereferencing page->mapping->host->i_sb and looking
for field s_dev, then I don't agree. Sometimes i_sb is NULL from what I recall,
especially in cases where the read page is from a journaling partition.
So unless I didn't understand you, I'll keep this part as well as the following,
to cover :
- a mapping of an actual file
- a mapping of a partition block
>
>> + ),
>> +
>> + TP_fast_assign(
>> + __entry->page = page;
>> + __entry->i_no = page->mapping->host->i_ino;
>> + __entry->pageofs = page->index;
>> + if (page->mapping->host->i_sb)
>> + __entry->s_dev = page->mapping->host->i_sb->s_dev;
>> + else
>> + __entry->s_dev = page->mapping->host->i_rdev;
>
> and hence avoid all this stuff.
See above.
>
>> + ),
>> +
>> + TP_printk("page=%p pfn=%lu blk=%d:%d inode+ofs=%lu+%lu",
>> + __entry->page,
>> + page_to_pfn(__entry->page),
>> + MAJOR(__entry->s_dev), MINOR(__entry->s_dev),
>> + __entry->i_no,
>> + __entry->pageofs << PAGE_SHIFT)
>> +);
>> +
>> +TRACE_EVENT(mm_filemap_add_to_page_cache,
>
Agreed for patch V2.
Thanks for the review.
--
Robert
next prev parent reply other threads:[~2012-11-21 10:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-08 19:54 [RFC PATCH] mm: trace filemap add and del Robert Jarzmik
2012-11-20 23:57 ` Andrew Morton
2012-11-21 3:59 ` Dave Chinner
2012-11-21 10:38 ` Robert Jarzmik
2012-11-22 11:51 ` Robert Jarzmik
2012-11-23 0:15 ` Dave Chinner
2012-11-21 10:36 ` Robert Jarzmik [this message]
2012-11-21 5:07 ` Hugh Dickins
2012-11-21 10:41 ` Robert Jarzmik
2012-11-23 14:10 ` [PATCH v2] " Robert Jarzmik
2012-11-23 14:10 ` Robert Jarzmik
2012-11-23 23:34 ` [PATCH v3] " Robert Jarzmik
2012-11-23 23:34 ` Robert Jarzmik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sj835jl2.fsf@free.fr \
--to=robert.jarzmik@free.fr \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.