Re: [RFC PATCH] mm: trace filemap add and del

2012-11-22 Thread Dave Chinner
On Thu, Nov 22, 2012 at 12:51:00PM +0100, Robert Jarzmik wrote: > Dave Chinner writes: > > > We actually have an informal convention for formating filesystem > > trace events, and that is to use the device number > > > >> > >> > +), > >> > + > >> > +TP_printk("page=%p

Re: [RFC PATCH] mm: trace filemap add and del

2012-11-22 Thread Robert Jarzmik
Dave Chinner writes: > We actually have an informal convention for formating filesystem > trace events, and that is to use the device number > >> >> > + ), >> > + >> > + TP_printk("page=%p pfn=%lu blk=%d:%d inode+ofs=%lu+%lu", > > ... and to prefix messages like: > > TP_printk("dev

Re: [RFC PATCH] mm: trace filemap add and del

2012-11-22 Thread Robert Jarzmik
Dave Chinner da...@fromorbit.com writes: We actually have an informal convention for formating filesystem trace events, and that is to use the device number + ), + + TP_printk(page=%p pfn=%lu blk=%d:%d inode+ofs=%lu+%lu, ... and to prefix messages like: TP_printk(dev

Re: [RFC PATCH] mm: trace filemap add and del

2012-11-22 Thread Dave Chinner
On Thu, Nov 22, 2012 at 12:51:00PM +0100, Robert Jarzmik wrote: Dave Chinner da...@fromorbit.com writes: We actually have an informal convention for formating filesystem trace events, and that is to use the device number +), + +TP_printk(page=%p pfn=%lu

Re: [RFC PATCH] mm: trace filemap add and del

2012-11-21 Thread Robert Jarzmik
Hugh Dickins writes: > On Thu, 8 Nov 2012, Robert Jarzmik wrote: >> --- a/mm/filemap.c >> +++ b/mm/filemap.c >> @@ -467,6 +471,7 @@ int add_to_page_cache_locked(struct page *page, struct >> address_space *mapping, >> } else { >> page->mapping = NULL; >>

Re: [RFC PATCH] mm: trace filemap add and del

2012-11-21 Thread Robert Jarzmik
Dave Chinner writes: > We actually have an informal convention for formating filesystem > trace events, and that is to use the device number > >> >> > + ), >> > + >> > + TP_printk("page=%p pfn=%lu blk=%d:%d inode+ofs=%lu+%lu", > > ... and to prefix messages like: > > TP_printk("dev

Re: [RFC PATCH] mm: trace filemap add and del

2012-11-21 Thread Robert Jarzmik
Andrew Morton 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,

Re: [RFC PATCH] mm: trace filemap add and del

2012-11-21 Thread Robert Jarzmik
Andrew Morton a...@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. +

Re: [RFC PATCH] mm: trace filemap add and del

2012-11-21 Thread Robert Jarzmik
Dave Chinner da...@fromorbit.com writes: We actually have an informal convention for formating filesystem trace events, and that is to use the device number + ), + + TP_printk(page=%p pfn=%lu blk=%d:%d inode+ofs=%lu+%lu, ... and to prefix messages like: TP_printk(dev

Re: [RFC PATCH] mm: trace filemap add and del

2012-11-21 Thread Robert Jarzmik
Hugh Dickins hu...@google.com writes: On Thu, 8 Nov 2012, Robert Jarzmik wrote: --- a/mm/filemap.c +++ b/mm/filemap.c @@ -467,6 +471,7 @@ int add_to_page_cache_locked(struct page *page, struct address_space *mapping, } else { page-mapping = NULL;

Re: [RFC PATCH] mm: trace filemap add and del

2012-11-20 Thread Hugh Dickins
On Thu, 8 Nov 2012, Robert Jarzmik wrote: > --- a/mm/filemap.c > +++ b/mm/filemap.c > @@ -467,6 +471,7 @@ int add_to_page_cache_locked(struct page *page, struct > address_space *mapping, > } else { > page->mapping = NULL; > /* Leave

Re: [RFC PATCH] mm: trace filemap add and del

2012-11-20 Thread Dave Chinner
On Tue, Nov 20, 2012 at 03:57:35PM -0800, Andrew Morton wrote: > On Thu, 8 Nov 2012 20:54:10 +0100 > Robert Jarzmik wrote: . > > + __field(dev_t, s_dev) > > Perhaps use super_block.s_id here > > > + ), > > + > > + TP_fast_assign( > > + __entry->page = page; > > +

Re: [RFC PATCH] mm: trace filemap add and del

2012-11-20 Thread Andrew Morton
On Thu, 8 Nov 2012 20:54:10 +0100 Robert Jarzmik wrote: > Use the events API to trace filemap loading and > unloading of file pieces into the page cache. > > This patch aims at tracing the eviction reload > cycle of executable and shared libraries pages in > a memory constrained environment. >

Re: [RFC PATCH] mm: trace filemap add and del

2012-11-20 Thread Andrew Morton
On Thu, 8 Nov 2012 20:54:10 +0100 Robert Jarzmik robert.jarz...@free.fr wrote: Use the events API to trace filemap loading and unloading of file pieces into the page cache. This patch aims at tracing the eviction reload cycle of executable and shared libraries pages in a memory

Re: [RFC PATCH] mm: trace filemap add and del

2012-11-20 Thread Dave Chinner
On Tue, Nov 20, 2012 at 03:57:35PM -0800, Andrew Morton wrote: On Thu, 8 Nov 2012 20:54:10 +0100 Robert Jarzmik robert.jarz...@free.fr wrote: . + __field(dev_t, s_dev) Perhaps use super_block.s_id here + ), + + TP_fast_assign( + __entry-page = page;

Re: [RFC PATCH] mm: trace filemap add and del

2012-11-20 Thread Hugh Dickins
On Thu, 8 Nov 2012, Robert Jarzmik wrote: --- a/mm/filemap.c +++ b/mm/filemap.c @@ -467,6 +471,7 @@ int add_to_page_cache_locked(struct page *page, struct address_space *mapping, } else { page-mapping = NULL; /* Leave page-index

[RFC PATCH] mm: trace filemap add and del

2012-11-08 Thread Robert Jarzmik
Use the events API to trace filemap loading and unloading of file pieces into the page cache. This patch aims at tracing the eviction reload cycle of executable and shared libraries pages in a memory constrained environment. The typical usage is to spot a specific device and inode (for example

[RFC PATCH] mm: trace filemap add and del

2012-11-08 Thread Robert Jarzmik
Use the events API to trace filemap loading and unloading of file pieces into the page cache. This patch aims at tracing the eviction reload cycle of executable and shared libraries pages in a memory constrained environment. The typical usage is to spot a specific device and inode (for example