SVNews r327411

NOTE: This service is experimental and subject to change! Use at your own risk!

2017-12-31 04:06:11 - r327411 by mjg (Mateusz Guzik)

Complete list of files affected by revision r327411:

(Note: At the moment, these links point to ViewVC on They are probably slow. Do not overuse.)

   Contents     MODIFY   /stable/11  
  History   Contents   Diff   MODIFY   /stable/11/sys/kern/vfs_cache.c  

Commit message:

MFC r323307,r323308,r323385,r324378,r325266,r325268,r325433,r325451,r325456,

  namecache: factor out dot lookup into a dedicated function

  The intent is to move uncommon cases out of the way.


  namecache: fold the unlock label into the only consumer

  No functional changes.


  namecache: clean up struct namecache_ts handling

  namecache_ts differs from mere namecache by few fields placed mid struct.
  The access to the last element (the name) is thus special-cased.

  The standard solution is to put new fields at the very beginning anad
  embedd the original struct. The pointer shuffled around points to the
  embedded part. If needed, access to new fields can be gained through


  namecache: factor out ~MAKEENTRY lookups from the common path

  Lookups of the sort are rare compared to regular ones and succesfull ones
  result in removing entries from the cache.

  In the current code buckets are rlocked and a trylock dance is performed,
  which can fail and cause a restart. Fixing it will require a little bit
  of surgery and in order to keep the code maintaineable the 2 cases have
  to split.


  namecache: ncnegfactor 16 -> 12

  It is used on each new entry addition to decide whether to whack an existing
  negative entry in order to prevent a blow out in size, but the parameter was
  set years ago and never revisited.

  Building with poudriere results in about 400 evictions per second which
  unnecessarily grab entries from the hot list.

  With the new parameter there are next to no evictions of the sort.


  namecache: fix .. check broken after r324378


  namecache: skip locking in cache_purge_negative if there are no entries


  namecache: skip locking in cache_lookup_nomakeentry if there is no entry


  namecache: wlock buckets in cache_lookup_nomakeentry

  Since the case of an empty chain was already covered, it si very likely
  that the existing entry is matching. Skipping readlocking saves on lock


  namecache: bump numcache after dropping all locks

  This makes no difference correctness-wise, but shortens total hold time.


Powered by Python FreeBSD support by secnetix GmbH & Co. KG

Page generated in 38 ms, 2 files printed. Current time is 2018-04-20 13:15:28. All times are in UTC/GMT.