Do not have SCPs ask for vcores
authorBarret Rhoden <brho@cs.berkeley.edu>
Thu, 1 Dec 2016 21:38:42 +0000 (16:38 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Wed, 7 Dec 2016 22:46:48 +0000 (14:46 -0800)
The kernel ignores it, but it's a waste of a syscall.  This popped up in
some syscall traces with dropbear - that uses a 2LS but isn't an MCP.  We'd
probably have the same issue with VMMs in -s mode.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
user/parlib/vcore.c

index 1783d98..d39267e 100644 (file)
@@ -249,7 +249,7 @@ void vcore_request_total(long nr_vcores_wanted)
 {
        static long nr_vc_wanted;
 
-       if (parlib_never_vc_request)
+       if (parlib_never_vc_request || !parlib_wants_to_be_mcp)
                return;
        if (nr_vcores_wanted == __procdata.res_req[RES_CORES].amt_wanted)
                return;