lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20121120155735.905bbf9e.akpm@linux-foundation.org>
Date:	Tue, 20 Nov 2012 15:57:35 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Robert Jarzmik <robert.jarzmik@...e.fr>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] mm: trace filemap add and del

On Thu,  8 Nov 2012 20:54:10 +0100
Robert Jarzmik <robert.jarzmik@...e.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 constrained environment.
> 
> The typical usage is to spot a specific device and
> inode (for example /lib/libc.so) to see the eviction
> cycles, and find out if frequently used code is
> rather spread across many pages (bad) or coallesced
> (good).

I suppose that could be useful.

>
> ...
>
> +TRACE_EVENT(mm_filemap_delete_from_page_cache,
> +
> +	TP_PROTO(struct page *page),
> +
> +	TP_ARGS(page),
> +
> +	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.

> +		__field(unsigned long, pageofs)

"index".

> +		__field(dev_t, s_dev)

Perhaps use super_block.s_id here

> +	),
> +
> +	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.

> +	),
> +
> +	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,

Dittoes.


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ