Re: [PATCH] Provide an interface to limit total page cache.

2007-01-18 Thread Pavel Machek
Hi! > A patch provide a interface to limit total page cache in > /proc/sys/vm/pagecache_ratio. The default value is 90 > percent. Any > feedback is appreciated. Are you sure percentage is right thing to use? 1% of 200GB machine is 2GB... granularity seems too big here. KB? parts per million?

Re: [PATCH] Provide an interface to limit total page cache.

2007-01-17 Thread Eric W. Biederman
"Roy Huang" <[EMAIL PROTECTED]> writes: > A patch provide a interface to limit total page cache in > /proc/sys/vm/pagecache_ratio. The default value is 90 percent. Any > feedback is appreciated. Anything except a default value of 100% will change the behavior and probably reduce the performance o

Re: [PATCH] Provide an interface to limit total page cache.

2007-01-17 Thread Vaidyanathan Srinivasan
Hi Roy, I have added a different pagecache reclaim logic around your sysctl interface. This would ensure that only pagecache pages are reclaimed if the limit is exceeded. --Vaidy Pagecache pages in memory can be limited to a percentage of total RAM using this patch. New sysctl entry /proc/s

Re: [PATCH] Provide an interface to limit total page cache.

2007-01-16 Thread Balbir Singh
Roy Huang wrote: > Hi Balbir, > > Thanks for your comment. > > On 1/15/07, Balbir Singh <[EMAIL PROTECTED]> wrote: > >> wakeup_kswapd and shrink_all_memory use swappiness to determine what to >> reclaim >> (mapped pages or page cache). This patch does not ensure that only >> page cache is >> r

Re: [PATCH] Provide an interface to limit total page cache.

2007-01-15 Thread Roy Huang
The possible cause is a bug in kswapd thread, or shrink_all_memory cannot be called in kswapd thread. On 1/15/07, Vaidyanathan Srinivasan <[EMAIL PROTECTED]> wrote: Roy Huang wrote: > A patch provide a interface to limit total page cache in > /proc/sys/vm/pagecache_ratio. The default value is 9

Re: [PATCH] Provide an interface to limit total page cache.

2007-01-15 Thread Roy Huang
Hi Balbir, Thanks for your comment. On 1/15/07, Balbir Singh <[EMAIL PROTECTED]> wrote: wakeup_kswapd and shrink_all_memory use swappiness to determine what to reclaim (mapped pages or page cache). This patch does not ensure that only page cache is reclaimed/limited. If the swappiness value i

Re: [PATCH] Provide an interface to limit total page cache.

2007-01-15 Thread Vaidyanathan Srinivasan
Roy Huang wrote: > A patch provide a interface to limit total page cache in > /proc/sys/vm/pagecache_ratio. The default value is 90 percent. Any > feedback is appreciated. [snip] I tried to run your patch on PPC64 SMP machine, unfortunately kswapd crashes the kernel when the pagecache limit is e

Re: [PATCH] Provide an interface to limit total page cache.

2007-01-15 Thread Balbir Singh
On 1/15/07, Roy Huang <[EMAIL PROTECTED]> wrote: A patch provide a interface to limit total page cache in /proc/sys/vm/pagecache_ratio. The default value is 90 percent. Any feedback is appreciated. [snip] wakeup_kswapd and shrink_all_memory use swappiness to determine what to reclaim (mapped

[PATCH] Provide an interface to limit total page cache.

2007-01-15 Thread Roy Huang
A patch provide a interface to limit total page cache in /proc/sys/vm/pagecache_ratio. The default value is 90 percent. Any feedback is appreciated. -Roy diff -urp a/include/linux/pagemap.h b/include/linux/pagemap.h --- a/include/linux/pagemap.h 2006-11-30 05:57:37.0 +0800 +++ b/includ