lkml.org 
[lkml]   [2003]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: cache limit
Thank you for interest in my patch.

On Thu, 21 Aug 2003 11:52:52 +0200, Ihar 'Philips' Filipau wrote:

>Takao Indoh wrote:
>>
>> I made a patch to add new paramter /proc/sys/vm/pgcache-max. It controls
>> maximum number of pages used as pagecache.
>> An attached file is a mere test patch, so it may contain a bug or ugly
>> code. Please let me know if there is an advice, comment, better
>> implementation, and so on.
>>
>
> Do you have something like this for 2.4 kernels?

No, I have only a patch for 2.5 kernel.
But, RedHat AdvancedServer2.1(2.4.9based kernel) has a similar parameter
(/proc/sys/vm/pagecache). If you can see the source, please check it.

>
> [ I expected to find that by default Linux stops polluting memory
>with cache when there is no more pages. But as I see your patch is
>hacking something somewhere in the middle... But I'm not a specialist in
>VM... Gone reading sources. ]
>
> Thanks for the patch.

I'm not a specialist in VM, too. So, that patch may have many bugs.
What is done in that patch is very simple.
1) Add PG_pgcache flag to the page used as pagecache.
2) Watch the total amount of pagecahe.
3) If the amount of pagecahe exceeds maximum,
try to remove only the page which has PG_pgcache flag.

Thanks.
--------------------------------------------------
Takao Indoh
E-Mail : indou.takao@soft.fujitsu.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.042 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site