svn commit: r253974 - head/sys/ufs/ffs

Kirk McKusick mckusick at FreeBSD.org
Mon Aug 5 22:02:45 UTC 2013


Author: mckusick
Date: Mon Aug  5 22:02:45 2013
New Revision: 253974
URL: http://svnweb.freebsd.org/changeset/base/253974

Log:
  With the addition of journalled soft updates, the "newblk" structures
  persist much longer than previously. Historically we had at most 100
  entries; now the count may reach a million. With the increased count
  we spent far too much time looking them up in the grossly undersized
  newblk hash table. Configure the newblk hash table to accurately reflect
  the number of entries that it must index.
  
  Reviewed by: kib
  Tested by:   Peter Holm
  MFC after:   2 weeks

Modified:
  head/sys/ufs/ffs/ffs_softdep.c

Modified: head/sys/ufs/ffs/ffs_softdep.c
==============================================================================
--- head/sys/ufs/ffs/ffs_softdep.c	Mon Aug  5 22:01:16 2013	(r253973)
+++ head/sys/ufs/ffs/ffs_softdep.c	Mon Aug  5 22:02:45 2013	(r253974)
@@ -2393,7 +2393,7 @@ softdep_initialize()
 	max_softdeps = desiredvnodes * 4;
 	pagedep_hashtbl = hashinit(desiredvnodes / 5, M_PAGEDEP, &pagedep_hash);
 	inodedep_hashtbl = hashinit(desiredvnodes, M_INODEDEP, &inodedep_hash);
-	newblk_hashtbl = hashinit(desiredvnodes / 5,  M_NEWBLK, &newblk_hash);
+	newblk_hashtbl = hashinit(max_softdeps / 2,  M_NEWBLK, &newblk_hash);
 	bmsafemap_hashtbl = hashinit(1024, M_BMSAFEMAP, &bmsafemap_hash);
 	i = 1 << (ffs(desiredvnodes / 10) - 1);
 	indir_hashtbl = malloc(i * sizeof(indir_hashtbl[0]), M_FREEWORK,


More information about the svn-src-head mailing list