Page 2 of 3
Re: Compiling Kernel with cgroups support and other patches
Posted: 25. Jan 2011, 18:59
by thenktor
Did you use the config of the kernel-huge package?
Re: Compiling Kernel with cgroups support and other patches
Posted: 25. Jan 2011, 20:16
by garby
Yes, but also enabled for lxc:
CONFIG_GROUP_SCHED=y
CONFIG_FAIR_GROUP_SCHED=y
CONFIG_RT_GROUP_SCHED=y
CONFIG_CGROUP_SCHED=y
CONFIG_CGROUPS=y
CONFIG_CGROUP_NS=y
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CPUSETS=y
CONFIG_PROC_PID_CPUSET=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_RESOURCE_COUNTERS=y
CONFIG_CGROUP_MEM_RES_CTLR=y
CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y
CONFIG_MM_OWNER=y
CONFIG_NAMESPACES=y
CONFIG_UTS_NS=y
CONFIG_IPC_NS=y
CONFIG_USER_NS=y
CONFIG_PID_NS=y
CONFIG_NET_NS=y
CONFIG_NET_CLS_CGROUP=y
CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
BTW, I managed to run the latest kernel (2.6.38-rc2) in my laptop after running mkinitrd and specifying initrd image in grub.cfg , but nvidia driver refuses to compile even after I have specified --kernel-source-path

Also created a package using the kernel-huge.Slackbuild. But I installed manually because I could not figure out how to install new kernel-huge-lxc package without removing the salix default kernel. I can post the Slackbuild info and the package I created if someone needs.
One thing that I am noticing is the new setup seems to be a bit slower than the Salix default kernel. I am just wondering whether Salix applies specific patch to kernel.
I enabled cgroup in my server in 2.6.33.4 kernel, but it simply refuses to boot. I shall check once again tomorrow.
Re: Compiling Kernel with cgroups support and other patches
Posted: 25. Jan 2011, 20:50
by linus72
Hope this info helps some
I have compiled a live 2.6.37 kernel for my Salix based PocketWriter build and would gladly share the .config,etc with you?
http://multidistro.com/downloads.html
Alos, you may have to add libcgroup from Slackware -current???
not sure but I added it to mine....
http://linorg.usp.br/slackware-current/ ... libcgroup/
I originally got the patch,etc from here, including the .config
http://aur.archlinux.org/packages.php?ID=43689
Re: Compiling Kernel with cgroups support and other patches
Posted: 25. Jan 2011, 22:00
by garby
I would love to get you config files. But how?
BTW, the pocketwriter os seems to be an interesting concept, but does it support 64-bit processors?
I would love to test.

Or you can send me a PM with your email.

Thank you for your offer.
Re: Compiling Kernel with cgroups support and other patches
Posted: 25. Jan 2011, 23:52
by linus72
hey garby
here's the kernel config
http://multidistro.com/Kernels/2.6.37/config-2.6.37-smp
here's the kernel, firmware, and modules as pkgs,
kernel
http://multidistro.com/Kernels/2.6.37/k ... 686-2l.txz
modules
http://multidistro.com/Kernels/2.6.37/k ... 686-2l.txz
firmware
kernel-firmware-2.6.37-noarch-2l.txz
right now PocketWriter is i686, it does run on my amd athlon64 as it runs both 32bit and 64bit
Re: Compiling Kernel with cgroups support and other patches
Posted: 26. Jan 2011, 01:15
by pevsner
Hi Garby,
A good general guide for compiling can be found at alienbobs blog
http://alien.slackbook.org/dokuwiki/dok ... elbuilding
For 2.6.38-rc2 I:-
Copied the huge .config from the slackware-current repo,
did:- "make old config" ( accepting all the new entries),
(plugged in usb device for detection) then "make localmodconfig" (trims to your system,and builds real fast).
"make gconfig" and edit what you want (tick general>automatic process group scheduling(for cgroup patch), and I always tick processor family>athlon64(or whatever you have).
It's worth ticking "general>Automatically append version information to the version string" and then editing .config to pop in your specific version (eg "-mykernel").
"make bzImage modules"
"install modules"
"cp arch/x86_64/boot/bzImage /boot/vmlinuz-2.6.38-rc2-mykernel" # copy the new kernel file
"cp System.map /boot/System.map-2.6.38-rc2-mykernel " # copy the System.map (optional)
"cp .config /boot/config-2.6.38-rc2-mykernel" # backup copy of your kernel config
"cd /boot"
"rm System.map" # delete the old link
"ln -s System.map--2.6.38-rc2-mykernel" # create a new link
Edit lilo or grub > reboot.
Idk about enabling any other cool, but it's all running nicely for me atm.
Re: Compiling Kernel with cgroups support and other patches
Posted: 26. Jan 2011, 08:59
by thenktor
garby wrote:Thank you, I compiled the 2.6.38-rc2 kernel with the cgroups enabled with the default config from the stock config of salix 2.6.33.4. But I am getting kernel panic (not syncing VFS Unable to mount rootfs on unknown device). I tried to specify rootfstype=ext4 in the grub2 linux line, but it remails same.
I've compiled a 2.6.38-rc2 kernel for my new notebook now and run into the same problem. Fix was easy: instead of using the
.config from the kernel-source package you have to use the config of the running huge kernel:
zcat /proc/config.gz > .config
Then of course the usual kernel build commands:
make oldconfig
make -j3
make modules_install
...
Re: Compiling Kernel with cgroups support and other patches
Posted: 26. Jan 2011, 09:05
by JRD
This is a good tip indeed Thenktor.
Or you can also use the config file in /boot which is the same. But yes, the .config in /usr/src/linux is the vanilla config file, not the one tweaked by Pat.
Re: Compiling Kernel with cgroups support and other patches
Posted: 26. Jan 2011, 13:40
by thenktor
JRD wrote:the .config in /usr/src/linux is the vanilla config file, not the one tweaked by Pat.
I think it's the Slackware config file, but not the one for the huge kernel. It's the one for the standard kernel, that uses an initrd.
Re: Compiling Kernel with cgroups support and other patches
Posted: 27. Jan 2011, 09:05
by garby
I did compile the kernel with the combined config from huge and customized ( config file here
http://pastebin.com/Czigcvsv). Now when I do lxc-checkconfig, I find the 'File capabilities: missing"! I enabled Posix file capabilities in the kernel config. Which kernel CONFIG makes 'File Capabilities' enabled?
$ lxc-checkconfig
--- Namespaces ---
Namespaces: enabled
Utsname namespace: enabled
Ipc namespace: enabled
Pid namespace: enabled
User namespace: enabled
Network namespace: enabled
Multiple /dev/pts instances: enabled
--- Control groups ---
Cgroup: enabled
Cgroup namespace: enabled
Cgroup device: enabled
Cgroup sched: enabled
Cgroup cpu account: enabled
Cgroup memory controller: enabled
Cgroup cpuset: enabled
--- Misc ---
Veth pair device: enabled
Macvlan: enabled
Vlan: enabled
File capabilities: missing
Note : Before booting a new kernel, you can check its configuration
usage : CONFIG=/path/to/config /usr/bin/lxc-checkconfig