← Back to team overview

kernel-packages team mailing list archive

[Bug 1435571] commit 79063bffc81f82689bd90e16da1b49408f3bf095

 

------- Comment (attachment only) From sklarj@xxxxxxxxxx 2015-03-24 01:06 EDT-------


** Attachment added: "commit 79063bffc81f82689bd90e16da1b49408f3bf095"
   https://bugs.launchpad.net/bugs/1435571/+attachment/4353998/+files/effectiveCPUclear.patch

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1435571

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

Status in linux package in Ubuntu:
  New

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
  ftp://ftp.unicamp.br/pub/linuxpatch/docker-ppc64/ubuntu/14_10/docker.io-1.4.1-dev_ppc64el.deb

  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
  /bin/bash

  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
  root@06b22766d612:/# 

  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 
  6-7

  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").

  -Nish

  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
  cgroup.clone_children=1

  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)

  Canonical,

  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.

  -Nish

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