Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/librump/rumpkern Limit virtual CPUs to MAXCPUS for ...
details: https://anonhg.NetBSD.org/src/rev/3e709aae8fb3
branches: trunk
changeset: 754329:3e709aae8fb3
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Apr 28 00:42:16 2010 +0000
description:
Limit virtual CPUs to MAXCPUS for now.
diffstat:
sys/rump/librump/rumpkern/scheduler.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (31 lines):
diff -r 46ff2223d050 -r 3e709aae8fb3 sys/rump/librump/rumpkern/scheduler.c
--- a/sys/rump/librump/rumpkern/scheduler.c Wed Apr 28 00:34:25 2010 +0000
+++ b/sys/rump/librump/rumpkern/scheduler.c Wed Apr 28 00:42:16 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scheduler.c,v 1.12 2010/04/27 23:30:30 pooka Exp $ */
+/* $NetBSD: scheduler.c,v 1.13 2010/04/28 00:42:16 pooka Exp $ */
/*
* Copyright (c) 2009 Antti Kantee. All Rights Reserved.
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scheduler.c,v 1.12 2010/04/27 23:30:30 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scheduler.c,v 1.13 2010/04/28 00:42:16 pooka Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@@ -80,6 +80,12 @@
struct cpu_info *ci;
int i;
+ if (num > MAXCPUS) {
+ aprint_verbose("CPU limit: %d wanted, %d (MAXCPUS) available\n",
+ num, MAXCPUS);
+ num = MAXCPUS;
+ }
+
for (i = 0; i < num; i++) {
rcpu = &rcpu_storage[i];
ci = &rump_cpus[i];
Home |
Main Index |
Thread Index |
Old Index