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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 28 Feb 2013 21:47:00 +0100
Robert Jarzmik <robert.jarzmik@xxxxxxx> 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).
> 
> ...
>
>  		if (likely(!error)) {
>  			mapping->nrpages++;
>  			__inc_zone_page_state(page, NR_FILE_PAGES);
> +			trace_mm_filemap_add_to_page_cache(page);
>  			spin_unlock_irq(&mapping->tree_lock);
>  		} else {
>  			page->mapping = NULL;

I don't see a need to do this under the spinlock.  The page is locked
so nobody else will be fiddling with it.  There would be a tiny
scalability gain from moving the tracepoint outside the locked region.


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]