← Back to team overview

kernel-packages team mailing list archive

[Bug 1435571] Comment bridged from LTC Bugzilla


------- Comment From aravam@xxxxxxxxxx 2015-04-06 16:25 EDT-------
Update from Raghu:

FYI .. linux-image-3.19.0-12-generic should be carrying the fix. I
tested the kernel and it is working.

root@ragbase:~# uname -a
Linux ragbase 3.19.0-12-generic #12-Ubuntu SMP Fri Apr 3 04:03:54 UTC 2015 ppc64le ppc64le ppc64le GNU/Linux
root@ragbase:~# docker run --cpuset=0,1  -itd ubuntu:vivid  /bin/bash
root@ragbase:~# docker run --cpuset=0,1  -itd ubuntu:vivid  /bin/bash^C
root@ragbase:~# docker attach a4d1f2951829fe5d201010d944009ecbfe388305ecf02d56a0d64f42cf227ba2

root@ragbase:~# cat /proc/self/status |grep Cpus
Cpus_allowed:	f
Cpus_allowed_list:	0-3

You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.

  docker: docker run --cpuset is not having any effect

Status in linux package in Ubuntu:

Bug description:
  ---Problem Description---
  docker: cpuset resouce allocaton on a container shows/lists all CPU of VM host
  ---uname output---
  root@8a2d293ba30d:/sys# uname -a Linux 8a2d293ba30d 3.19.0-7-generic #7-Ubuntu SMP Fri Feb 27 00:26:30 UTC 2015 ppc64le ppc64le ppc64le GNU/Linux
  Machine Type = Power 8 / PowerKVM 
  ---Steps to Reproduce---
  1 - Install docker 1.4 developer build on PowerKVM Ubuntu 15.04 LE geust

  2 - Create vivid image using debootstrap

  3 - Run a container using below command with cpuset=6,7

  root@dockerbase:~# docker run -it --cpuset=6,7 vivid-cpuset-stress

  4 - Inside container check for : grep processor /proc/cpuinfo
  root@06b22766d612:/# grep processor /proc/cpuinfo
  processor	: 0
  processor	: 1
  processor	: 2
  processor	: 3
  processor	: 4
  processor	: 5
  processor	: 6
  processor	: 7
  processor	: 8
  processor	: 9
  processor	: 10
  processor	: 11
  processor	: 12
  processor	: 13
  processor	: 14
  processor	: 15

  It does list all CPUs of guest VM aka host in this case instead
  expected 6,7 cpu to be bound to this container.

  At host end "cpuset" :
  root@dockerbase:~# cat /sys/fs/cgroup/cpuset/docker/06b22766d61244fc5964d2a11bb0972d05ad72bb5899b6f55663c603bf5d6cba/cpuset.cpus 

  Nish, AFAIK, effective cpus was relevant only for unified hierarchy...
  they used to set effective_cpus= cpuset.cpus .. but will investigate
  more on this..

  Uh, I think this got fixed upstream, can we check? Maybe build an
  Ubuntu test kernel (this should get auto-pulled in in some future
  build, due to -stable):

  79063bffc81f82689bd90e16da1b49408f3bf095 ("cpuset: fix a warning when
  clearing configured masks in old hierarchy").


  I did some more investigation and as Nish pointed there were some bugs
  that got fixed in upstream.

  Root cause: cgroup.clone_children was not handled properly. the bug appears when we have

  if we set 0 to clone_children it should work properly.
  so better if we backport below patch (if not already to fix the current problem)

  1. 790317e1b266c776765a4bdcedefea706ff0fada: cpuset: initialize effective masks when clone_children is enabled
  2. 79063bffc81f82689bd90e16da1b49408f3bf095 ("cpuset: fix a warning when clearing configured masks in old hierarchy"). (Nish pointed this patch)


  both the above patches are targetted for 3.19-stable (in fact 3.17+),
  but given the possible miss on schedule between the upstream
  3.19-stable releases and 15.04 kernel freeze, can we please manually
  include them until they are present in -stable? Without the changes,
  the cpuset cgroups are rather broken.


To manage notifications about this bug go to: