All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rishikesh K. Rajak" <risrajak-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
To: gowrishankar
	<gomuthuk-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Cc: iranna.ankad-xthvdsQ13ZrQT0dZR+AlfA@public.gmane.org,
	sudhirkumarmalik-xthvdsQ13ZrQT0dZR+AlfA@public.gmane.org,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	dhavalgiani-xthvdsQ13ZrQT0dZR+AlfA@public.gmane.org,
	risrajak-xthvdsQ13ZrQT0dZR+AlfA@public.gmane.org,
	Balbir Singh
	<balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Subject: Re: [Testing CGROUP inside CONTAINER]: BUG#1
Date: Thu, 04 Dec 2008 18:42:21 +0530	[thread overview]
Message-ID: <1228396341.31543.3.camel@localhost.localdomain> (raw)
In-Reply-To: <4937DA54.8060801-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>

On Thu, 2008-12-04 at 18:55 +0530, gowrishankar wrote:

> Hi Rishi,
> Rishikesh K. Rajak wrote:
> > Hi All,
> >
> > Recently i have started using tool (lxc-0.4.1.tar.gz) for container
> > creation released by Daniel. I am not sure if inside container, cgroup
> > support is there or not. If it is not supported till now then here is
> >   
> > the point where we can start to look into it.
> >
> > Steps executed:
> >
> >     - create a container : lxc-create -f /etc/lxc-no-netns.conf -n xray
> >         rishi :~ # cat /etc/lxc-no-netns.conf
> >             # Container with non-virtualized network
> >              lxc.utsname = delta
> >     -  Execute container
> >         :~ # lxc-execute -n xray /bin/bash
> >         delta:~ #
> >     -  Execute the following command inside container
> >      delta:~ # mkdir /cpu
> >      delta:~ # mount -t cgroup -ocpu cgroup /cpu
> >
> >     -   delta:~ # cat /cpu/tasks
> >
> >     - You can see many zero's has attached with task file inside
> > container. 
> >
> >   
> It is expected behaviour of container, as PIDs in other namespaces will 
> always be shown as 0.
> So here, these 0s are from system ns (probably, as you had only system 
> ns and delta ns).
> I have been trying to fix for "for_each_process" macro related stuff wrt 
> container code, yet I ll check out
> if I am right, as I am also curious now.
> > As i can understand cgroup has been mounted inside container so it
> > should attach the task which is running inside container. Please correct
> >   
> Yes. and it is doing already. Only problem is unwanted 0s. Loot at the 


Hi Gowri,

Yes, the problem is right here i think. Many 0s should not appear, as
inside container only container process should be read.
Not the root's processes.

-Rishi


> bottom of list you get
> while cat. you see numbers other than 0,which are container processes.
> > me if i am wrong here.
> >
> > Additional info:
> >
> > rishi:~ # cat /boot/config-2.6.27.7-4-pae | grep CGROUP
> > CONFIG_CGROUPS=y
> > # CONFIG_CGROUP_DEBUG is not set
> > CONFIG_CGROUP_NS=y
> > CONFIG_CGROUP_DEVICE=y
> > CONFIG_CGROUP_FREEZER=y
> > CONFIG_CGROUP_SCHED=y
> > CONFIG_CGROUP_CPUACCT=y
> > CONFIG_CGROUP_MEM_RES_CTLR=y
> > rishi:~ # cat /boot/config-2.6.27.7-4-pae | grep _NS
> > CONFIG_CGROUP_NS=y
> > CONFIG_UTS_NS=y
> > CONFIG_IPC_NS=y
> > CONFIG_USER_NS=y
> > CONFIG_PID_NS=y
> > CONFIG_NF_CONNTRACK_NETBIOS_NS=m
> > CONFIG_NSC_FIR=m
> > CONFIG_BLK_DEV_NS87415=m
> > CONFIG_SCSI_NSP32=m
> > CONFIG_PATA_NS87410=m
> > CONFIG_PATA_NS87415=m
> > CONFIG_NS83820=m
> > CONFIG_GAMEPORT_NS558=m
> > CONFIG_NSC_GPIO=m
> > CONFIG_TCG_NSC=m
> > CONFIG_NCPFS_NFS_NS=y
> > CONFIG_NCPFS_OS2_NS=y
> > rishi:~ # uname -a
> > Linux rishi 2.6.27.7-4-pae #1 SMP 2008-11-25 00:02:37 +0100 i686 i686
> > i386 GNU/Linux
> > rishi:~ #
> >
> >
> > - Rishi
> > _______________________________________________
> > Containers mailing list
> > Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
> > https://lists.linux-foundation.org/mailman/listinfo/containers
> >
> >   
> Thanks for reporting.
> --
> Gowrishankar
> _______________________________________________
> Containers mailing list
> Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
> https://lists.linux-foundation.org/mailman/listinfo/containers

  parent reply	other threads:[~2008-12-04 13:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-04  8:14 [Testing CGROUP inside CONTAINER]: BUG#1 Rishikesh K. Rajak
     [not found] ` <1228378478.4234.35.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-12-04 13:25   ` gowrishankar
     [not found]     ` <4937DA54.8060801-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2008-12-04 13:12       ` Rishikesh K. Rajak [this message]
2008-12-04 13:34       ` Dave Hansen
2008-12-04 13:42         ` Rishikesh K Rajak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1228396341.31543.3.camel@localhost.localdomain \
    --to=risrajak-23vcf4htsmix0ybbhkvfkdbpr1lh4cv8@public.gmane.org \
    --cc=balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=dhavalgiani-xthvdsQ13ZrQT0dZR+AlfA@public.gmane.org \
    --cc=gomuthuk-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
    --cc=iranna.ankad-xthvdsQ13ZrQT0dZR+AlfA@public.gmane.org \
    --cc=risrajak-xthvdsQ13ZrQT0dZR+AlfA@public.gmane.org \
    --cc=sudhirkumarmalik-xthvdsQ13ZrQT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.