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
This commit is contained in:
Alan Cox 2017-05-27 21:46:00 +00:00
parent 8bc5011859
commit 07c348ea7b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=319001

View File

@ -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;
}
/*