Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 May 2017 21:46:00 +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: r319001 - head/sys/vm
Message-ID:  <201705272146.v4RLk0hP024293@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: alc
Date: Sat May 27 21:46:00 2017
New Revision: 319001
URL: https://svnweb.freebsd.org/changeset/base/319001

Log:
  After r118390, the variable "dmmax" was neither the correct strip size
  nor the correct maximum block size.  Moreover, after r318995, it serves
  no purpose except to provide information to user space through a read-
  sysctl.
  
  This change eliminates the variable "dmmax" but retains the sysctl.  It
  also corrects the value returned by the sysctl.
  
  Reviewed by:	kib, markj
  MFC after:	3 days

Modified:
  head/sys/vm/swap_pager.c

Modified: head/sys/vm/swap_pager.c
==============================================================================
--- head/sys/vm/swap_pager.c	Sat May 27 20:01:50 2017	(r319000)
+++ head/sys/vm/swap_pager.c	Sat May 27 21:46:00 2017	(r319001)
@@ -381,18 +381,14 @@ struct pagerops swappagerops = {
 };
 
 /*
- * dmmax is in page-sized chunks with the new swap system.  It was
- * dev-bsized chunks in the old.  dmmax is always a power of 2.
- *
  * swap_*() routines are externally accessible.  swp_*() routines are
  * internal.
  */
-static int dmmax;
 static int nswap_lowat = 128;	/* in pages, swap_pager_almost_full warn */
 static int nswap_hiwat = 512;	/* in pages, swap_pager_almost_full warn */
 
-SYSCTL_INT(_vm, OID_AUTO, dmmax, CTLFLAG_RD, &dmmax, 0,
-    "Maximum size of a swap block");
+SYSCTL_INT(_vm, OID_AUTO, dmmax, CTLFLAG_RD, &nsw_cluster_max, 0,
+    "Maximum size of a swap block in pages");
 
 static void	swp_sizecheck(void);
 static void	swp_pager_async_iodone(struct buf *bp);
@@ -489,11 +485,6 @@ swap_pager_init(void)
 	mtx_init(&sw_dev_mtx, "swapdev", NULL, MTX_DEF);
 	sx_init(&sw_alloc_sx, "swspsx");
 	sx_init(&swdev_syscall_lock, "swsysc");
-
-	/*
-	 * Device Stripe, in PAGE_SIZE'd blocks
-	 */
-	dmmax = SWB_NPAGES * 2;
 }
 
 /*



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