summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot/loader.go
diff options
context:
space:
mode:
Diffstat (limited to 'runsc/boot/loader.go')
-rw-r--r--runsc/boot/loader.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/runsc/boot/loader.go b/runsc/boot/loader.go
index 4a6528307..89300a953 100644
--- a/runsc/boot/loader.go
+++ b/runsc/boot/loader.go
@@ -18,6 +18,7 @@ package boot
import (
"fmt"
"math/rand"
+ "runtime"
"sync/atomic"
"syscall"
gtime "time"
@@ -171,10 +172,11 @@ func New(spec *specs.Spec, conf *Config, controllerFD int, ioFDs []int, console
Timekeeper: tk,
RootUserNamespace: creds.UserNamespace,
NetworkStack: networkStack,
- ApplicationCores: 8,
- Vdso: vdso,
- RootUTSNamespace: utsns,
- RootIPCNamespace: ipcns,
+ // TODO: use number of logical processors from cgroups.
+ ApplicationCores: uint(runtime.NumCPU()),
+ Vdso: vdso,
+ RootUTSNamespace: utsns,
+ RootIPCNamespace: ipcns,
}); err != nil {
return nil, fmt.Errorf("error initializing kernel: %v", err)
}