cache limit
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 7 lines · Takao Indoh
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?
[ 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.
Thank you for interest in my patch.
Quoted 10 lines · Ihar 'Philips' Filipau
Quoted 7 lines · Takao Indoh
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.
Quoted 7 lines
[ 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 : [email protected]