Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Dec 2019 17:28:41 +0000 (UTC)
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r355495 - head/sys/vm
Message-ID:  <201912071728.xB7HSfaM022992@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjg
Date: Sat Dec  7 17:28:41 2019
New Revision: 355495
URL: https://svnweb.freebsd.org/changeset/base/355495

Log:
  vm: fix sysctl vm.kstack_cache_size change report
  
  Cache gets resized correctly, but sysctl reports the wrong number:
  # sysctl vm.kstack_cache_size=512
  vm.kstack_cache_size: 128 -> 128
  
  patched:
  vm.kstack_cache_size: 128 -> 512
  
  Reviewed by:	markj
  Differential Revision:	https://reviews.freebsd.org/D22717
  Fixes:	r355002 "Revise the page cache size policy."

Modified:
  head/sys/vm/vm_glue.c

Modified: head/sys/vm/vm_glue.c
==============================================================================
--- head/sys/vm/vm_glue.c	Sat Dec  7 17:24:07 2019	(r355494)
+++ head/sys/vm/vm_glue.c	Sat Dec  7 17:28:41 2019	(r355495)
@@ -273,12 +273,12 @@ static int kstack_domain_iter;
 static int
 sysctl_kstack_cache_size(SYSCTL_HANDLER_ARGS)
 {
-	int error, newsize;
+	int error, oldsize;
 
-	newsize = kstack_cache_size;
-	error = sysctl_handle_int(oidp, &newsize, 0, req);
-	if (error == 0 && req->newptr && newsize != kstack_cache_size)
-		uma_zone_set_maxcache(kstack_cache, newsize);
+	oldsize = kstack_cache_size;
+	error = sysctl_handle_int(oidp, arg1, arg2, req);
+	if (error == 0 && req->newptr && oldsize != kstack_cache_size)
+		uma_zone_set_maxcache(kstack_cache, kstack_cache_size);
 	return (error);
 }
 SYSCTL_PROC(_vm, OID_AUTO, kstack_cache_size, CTLTYPE_INT|CTLFLAG_RW,



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