Module Name: src Committed By: pooka Date: Wed Apr 28 00:42:16 UTC 2010
Modified Files: src/sys/rump/librump/rumpkern: scheduler.c Log Message: Limit virtual CPUs to MAXCPUS for now. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/rump/librump/rumpkern/scheduler.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/rump/librump/rumpkern/scheduler.c diff -u src/sys/rump/librump/rumpkern/scheduler.c:1.12 src/sys/rump/librump/rumpkern/scheduler.c:1.13 --- src/sys/rump/librump/rumpkern/scheduler.c:1.12 Tue Apr 27 23:30:30 2010 +++ src/sys/rump/librump/rumpkern/scheduler.c Wed Apr 28 00:42:16 2010 @@ -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];