lkml.org 
[lkml]   [2007]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RPC][PATCH 2.6.20-rc5] limit total vfs page cache
On Thu, 18 Jan 2007, Aubrey Li wrote:

> +int sysctl_pagecache_ratio = 10;
> +

Pagecache ratio is the ratio of memory to be left over? Would it not be
better to twist this around and to be able to specify how much of the
memory of a node may be used by the pagecache?

Why limit the size of the pagecache? Some kind of rationale would be
useful. Maybe it was there in earlier incarnations of the patch that I did
not see? It should be kept with it.

zone_reclaim already dynamically limits the size of the pagecache.

> + if (alloc_flags & ALLOC_PAGECACHE)
> + min = min + (sysctl_pagecache_ratio * z->present_pages) / 100;

The calculation of the multiplication / division is usually not done in
the hot allocation path. See f.e. how min_unmapped_pages is handled in
mm/page_alloc.c
-
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: 2007-01-19 20:43    [W:0.060 / U:2.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site