Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Aug 2013 15:40:15 +0000 (UTC)
From:      Kirk McKusick <mckusick@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r255097 - head/sys/vm
Message-ID:  <201308311540.r7VFeF2S055285@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mckusick
Date: Sat Aug 31 15:40:15 2013
New Revision: 255097
URL: http://svnweb.freebsd.org/changeset/base/255097

Log:
  Fix bug introduced in rewrite of keg_free_slab in -r251894.
  The consequence of the bug is that fini calls are not done
  when a slab is freed by a call-back from the page daemon.
  It went unnoticed for two months because fini is little used.
  
  I spotted the bug while reading the code to learn how it works
  so I could write it up for the next edition of the Design and
  Implementation of FreeBSD book.
  
  No MFC needed as this code exists only in HEAD.
  
  Reviewed by: kib, jeff
  Tested by:   pho

Modified:
  head/sys/vm/uma_core.c

Modified: head/sys/vm/uma_core.c
==============================================================================
--- head/sys/vm/uma_core.c	Sat Aug 31 14:56:09 2013	(r255096)
+++ head/sys/vm/uma_core.c	Sat Aug 31 15:40:15 2013	(r255097)
@@ -780,7 +780,7 @@ finished:
 
 	while ((slab = SLIST_FIRST(&freeslabs)) != NULL) {
 		SLIST_REMOVE(&freeslabs, slab, uma_slab, us_hlink);
-		keg_free_slab(keg, slab, 0);
+		keg_free_slab(keg, slab, keg->uk_ipers);
 	}
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308311540.r7VFeF2S055285>