summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_malloc.c3
-rw-r--r--sys/kern/kern_sysctl.c11
-rw-r--r--sys/kern/uipc_mbuf.c8
3 files changed, 8 insertions, 14 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c
index cdca5cc3995..65a4d81848b 100644
--- a/sys/kern/kern_malloc.c
+++ b/sys/kern/kern_malloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_malloc.c,v 1.57 2004/05/23 19:37:24 tedu Exp $ */
+/* $OpenBSD: kern_malloc.c,v 1.58 2004/05/23 19:41:23 tedu Exp $ */
/* $NetBSD: kern_malloc.c,v 1.15.4.2 1996/06/13 17:10:56 cgd Exp $ */
/*
@@ -40,7 +40,6 @@
#include <sys/sysctl.h>
#include <uvm/uvm_extern.h>
-#include <ddb/db_output.h>
static struct vm_map_intrsafe kmem_map_store;
struct vm_map *kmem_map = NULL;
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index 728bc484fe6..f19f9f63e88 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sysctl.c,v 1.107 2004/05/23 19:37:24 tedu Exp $ */
+/* $OpenBSD: kern_sysctl.c,v 1.108 2004/05/23 19:41:23 tedu Exp $ */
/* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */
/*-
@@ -525,6 +525,7 @@ hw_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
int err;
int cpuspeed;
static int perflevel = 100;
+ int operflevel;
/* all sysctl names at this level except sensors are terminal */
if (name[0] != HW_SENSORS && namelen != 1)
@@ -576,17 +577,17 @@ hw_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
case HW_SETPERF:
if (!cpu_setperf)
return (EOPNOTSUPP);
+ operflevel = perflevel;
err = sysctl_int(oldp, oldlenp, newp, newlen, &perflevel);
if (err)
return err;
+ if (perflevel == operflevel)
+ return (0);
if (perflevel > 100)
perflevel = 100;
if (perflevel < 0)
perflevel = 0;
- if (newp)
- return (cpu_setperf(perflevel));
- else
- return (0);
+ return (cpu_setperf(perflevel));
default:
return (EOPNOTSUPP);
}
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
index 9520dd2552a..732676c49ec 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_mbuf.c,v 1.68 2004/05/23 19:37:24 tedu Exp $ */
+/* $OpenBSD: uipc_mbuf.c,v 1.69 2004/05/23 19:41:23 tedu Exp $ */
/* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */
/*
@@ -92,9 +92,6 @@ struct mbstat mbstat; /* mbuf stats */
struct pool mbpool; /* mbuf pool */
struct pool mclpool; /* mbuf cluster pool */
-struct pool_cache mbpool_cache;
-struct pool_cache mclpool_cache;
-
struct vm_map *mb_map;
int max_linkhdr; /* largest link-level header */
@@ -127,9 +124,6 @@ mbinit()
pool_set_drain_hook(&mbpool, m_reclaim, NULL);
pool_set_drain_hook(&mclpool, m_reclaim, NULL);
- pool_cache_init(&mbpool_cache, &mbpool, NULL, NULL, NULL);
- pool_cache_init(&mclpool_cache, &mclpool, NULL, NULL, NULL);
-
nmbclust_update();
/*