Re: [RFC 5/7] LTTng instrumentation mm

From: Dave Hansen
Date: Thu Nov 15 2007 - 17:16:38 EST


On Thu, 2007-11-15 at 16:51 -0500, Mathieu Desnoyers wrote:
> * Dave Hansen (haveblue@xxxxxxxxxx) wrote:
> > > On Tue, 2007-11-13 at 14:33 -0500, Mathieu Desnoyers wrote:
> > > linux-2.6-lttng/mm/page_io.c 2007-11-13 09:49:35.000000000 -0500
> > > @@ -114,6 +114,7 @@ int swap_writepage(struct page *page, st
> > > rw |= (1 << BIO_RW_SYNC);
> > > count_vm_event(PSWPOUT);
> > > set_page_writeback(page);
> > > + trace_mark(mm_swap_out, "address %p", page_address(page));
> > > unlock_page(page);
> > > submit_bio(rw, bio);
> > > out:
> >
> > I'm not sure all this page_address() stuff makes any sense on highmem
> > systems. How about page_to_pfn()?
>
> Knowing which page frame number has been swapped out is not always as
> relevant as knowing the page's virtual address (when it has one). Saving
> both the PFN and the page's virtual address could give us useful
> information when the page is not mapped.

For most (all?) architectures, the PFN and the virtual address in the
kernel's linear are interchangeable with pretty trivial arithmetic. All
pages have a pfn, but not all have a virtual address. Thus, I suggested
using the pfn. What kind of virtual addresses are you talking about?

-- Dave

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/