DragonFly BSD
DragonFly commits List (threaded) for 2011-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: DragonFly_RELEASE_2_8 kernel - Fix namecache memory exhaustion edge case


From: Venkatesh Srinivas <vsrinivas@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 25 Jan 2011 06:59:30 -0800 (PST)

commit 008a60704be743a1ab739a25a333c1c401309c11
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Mon Nov 22 23:24:25 2010 -0800

    kernel - Fix namecache memory exhaustion edge case
    
    * The namecache has traditionally relied on vnode limits to avoid
      blowing up its memory pool.  However, creating millions of hardlinks
      to the same vnode easily circumvents this assumption.
    
    * Enhance the negative cache hysteresis code with a section for the
      positive cache that does the same thing, preventing the namecache
      from growing greater than 2x maxvnodes.
    
      This situation will not occur under normal operation, it is strictly
      for correctness.  The kernel should never panic on normal filesystem
      operations even if those operations are unrealistic.
    
    * Tested w/HAMMER and a few million hardlinks to a single file.
    
    Reported-by: Venkatesh Srinivas <me@acm.jhu.edu>

Summary of changes:
 sys/kern/vfs_cache.c |   95 +++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 83 insertions(+), 12 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/008a60704be743a1ab739a25a333c1c401309c11


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]