Re: [PATCH] Add ability to dump mapped pages with /proc/sys/vm/drop_caches

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Soeren Sandmann <sandmann@...>
Cc: <linux-kernel@...>
Date: Sunday, September 30, 2007 - 11:36 pm

On Sun, Sep 30, 2007 at 08:03:51PM +0200, Soeren Sandmann wrote:
 > This patch adds the ability to drop mapped pages with
 > /proc/sys/vm/drop_caches. This is useful to get repeatable
 > measurements of startup time for applications. 
 > 
 > Without it, pages that are mapped in already-running applications will
 > not get dropped, so the time measured will not be a true cold-cache
 > time.
 > 
 > Rik pointed out that "be_atomic" is a bit pointless since there is a
 > race on SMP anyway where pages can be added. However, it is there in
 > the existing code, so I added it for the new code as well. Does anyone
 > know why it's there?
 
this cset added it (and has a pretty explanatory commit msg)

	Dave

commit fc9a07e7bf1a76e710f5df017abb07628db1781d
Author: Andrew Morton <akpm@linux-foundation.org>
Date:   Sun Jul 15 23:38:14 2007 -0700

    invalidate_mapping_pages(): add cond_resched
    
    invalidate_mapping_pages() can sometimes take a long time (millions of pages
    to free).  Long enough for the softlockup detector to trigger.
    
    We used to have a cond_resched() in there but I took it out because the
    drop_caches code calls invalidate_mapping_pages() under inode_lock.
    
    The patch adds a nasty flag and puts the cond_resched() back.



-- 
http://www.codemonkey.org.uk
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] Add ability to dump mapped pages with /proc/sys/..., Dave Jones, (Sun Sep 30, 11:36 pm)