lkml.org 
[lkml]   [2002]   [Aug]   [4]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSun, 04 Aug 2002 15:30:56 +0400
FromHans Reiser <>
SubjectRe: [PATCH] Caches that shrink automatically
How do you ensure that caches have their (internal) aging hands pushed 
at a speed that is proportional to their memory usage, or is your design 
susceptible to all the usual complaints the unified memory manager crowd 
has about separate caches?

Hans

Andreas Gruenbacher wrote:

>Hello,
>
>Currently there is no way for modules to define dynamically sized caches that 
>shrink upon memory pressure. We need this for implementing Extended Attribute 
>caches on ext2, ext3, and ReiserFS. Other caches could also make use of the 
>same mechanism (e.g., nfsd's permission cache, dcache, icache, dqache).
>
>I propose this patch, which adds the register_cache() and unregister_cache() 
>functions. They allow to register a callback which is invoked on memory 
>pressure. This callback shall then try to free some memory; the parameters 
>and semantics are similar to the other shrink functions in mm/vmscan.c.
>
>
>Regards,
>Andreas.
>
>------------------------------------------------------------------
> Andreas Gruenbacher                                SuSE Linux AG
> mailto:agruen@suse.de                     Deutschherrnstr. 15-19
> http://www.suse.de/                   D-90429 Nuernberg, Germany
>
>
> 
>


-- 
Hans



-
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 12:27    [W:0.501 / U:0.400 seconds]
©2003-2008 Jasper Spaans