It seems that the cpuset cgroup is causing this. Using the script below
I get this output:

In cgroup:
Cpus_allowed:   f
Cpus_allowed_list:      0-3

Outside cgroup:
Cpus_allowed:   e
Cpus_allowed_list:      1-3

The script:

#!/bin/bash

set -e

export CGDIR=/sys/fs/cgroup/cpuset/cpusets-$$

function cleanup {
        rmdir $CGDIR
}
trap cleanup EXIT

mkdir $CGDIR
cat $CGDIR/../cpuset.mems > $CGDIR/cpuset.mems
cat $CGDIR/../cpuset.cpus > $CGDIR/cpuset.cpus

/bin/bash -s <<'EOF'
set -e
echo "$$" > $CGDIR/tasks
echo "In cgroup:"
cat /proc/self/status | grep ^Cpus_allowed
EOF

echo
echo "Outside cgroup:"
cat /proc/self/status | grep ^Cpus_allowed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1623143

Title:
  Linux container does not take same cpu configuration as kernet's hosts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1623143/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to