Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Sep 2018 16:49:02 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r338912 - head/sys/vm
Message-ID:  <201809241649.w8OGn2HM098477@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: alc
Date: Mon Sep 24 16:49:02 2018
New Revision: 338912
URL: https://svnweb.freebsd.org/changeset/base/338912

Log:
  Passing UMA_ZONE_NOFREE to uma_zcreate() for swpctrie_zone and swblk_zone is
  redundant, because uma_zone_reserve_kva() is performed on both zones and it
  sets this same flag on the zone.  (Moreover, the implementation of the swap
  pager does not itself require these zones to be UMA_ZONE_NOFREE.)
  
  Reviewed by:	kib, markj
  Approved by:	re (gjb)
  MFC after:	1 week
  Differential Revision:	https://reviews.freebsd.org/D17296

Modified:
  head/sys/vm/swap_pager.c

Modified: head/sys/vm/swap_pager.c
==============================================================================
--- head/sys/vm/swap_pager.c	Mon Sep 24 16:48:54 2018	(r338911)
+++ head/sys/vm/swap_pager.c	Mon Sep 24 16:49:02 2018	(r338912)
@@ -545,13 +545,11 @@ swap_pager_swap_init(void)
 	if (maxswzone && n > maxswzone / sizeof(struct swblk))
 		n = maxswzone / sizeof(struct swblk);
 	swpctrie_zone = uma_zcreate("swpctrie", pctrie_node_size(), NULL, NULL,
-	    pctrie_zone_init, NULL, UMA_ALIGN_PTR,
-	    UMA_ZONE_NOFREE | UMA_ZONE_VM);
+	    pctrie_zone_init, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM);
 	if (swpctrie_zone == NULL)
 		panic("failed to create swap pctrie zone.");
 	swblk_zone = uma_zcreate("swblk", sizeof(struct swblk), NULL, NULL,
-	    NULL, NULL, _Alignof(struct swblk) - 1,
-	    UMA_ZONE_NOFREE | UMA_ZONE_VM);
+	    NULL, NULL, _Alignof(struct swblk) - 1, UMA_ZONE_VM);
 	if (swblk_zone == NULL)
 		panic("failed to create swap blk zone.");
 	n2 = n;



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