12 Şubat 2013 Salı

321. Compiling Kernel 3.7.3 (and 3.7.2) on Debian Testing/Wheezy. More data on make -jN.

To contact us Click HERE
Updated for 3.7.3

Since post '319. Collection of errors when compiling kernel 3.7.x on AMD FX 8150' is getting traffic from people wanting to compile kernel 3.7.2, and because I didn't know whether the azx_runtime_suspend bug had been fixed, I had to try it out. So here's how to compile kernel 3.7.2 and 3.7.3 -- for 3.7.2 simply replace all instances of 3.7.3..

Looking at the code changes here: http://lists-archives.com/linux-kernel/27763782-alsa-hda-move-runtime-pm-check-to-runtime_idle-callback.htmland comparing with what I'm actually seeing in sound/pci/hda/hda_intel.c it seems that 3.7.2 and 3.7.3 have been fixed and no patches need to be applied.

Testing the kernel bears that out.


Compiling the kernel
sudo apt-get install kernel-package fakeroot build-essential ncurses-bin ncurses-devmkdir ~/tmpcd ~/tmpwget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.7.3.tar.bz2tar xvf linux-3.7.3.tar.bz2cd linux-3.7.3/cat /boot/config-`uname -r`>.configmake oldconfigmake-kpkg clean

If you want to add specific drivers etc to the kernel, run
make menuconfig

Note that if you're transitioning from kernel 3.5 to 3.7 you will needto specifically and explicitly include a lot of the graphics (pci tv cards, usb web cams) drivers that used to be automatically included before.Then continue:

time fakeroot make-kpkg -j6 --initrd kernel_image kernel_headerssudo dpkg -i ../linux-image-3.7.3_3.7.3-10.00.Custom_amd64.deb ../linux-headers-3.7.3_3.7.3-10.00.Custom_amd64.deb

And you're done. Keep reading to learn more about -j6.


Optimal -jN
See here for another post on -jN: http://verahill.blogspot.com.au/2013/01/305-make-jn-should-n-equal-number-of.html. In short, it's not always clear whether N should equal the number of cores, or be larger than the number of cores. In that post, N+1 was the optimal configuration, but that was a very short compilation where i/o likely played a large role.

More data is needed, so here it is. Seems like N=number of cores is the best option for long builds (as was pointed out to me in a comment). This was done with kernel 3.7.2.

On a four-core Intel i5-2400 with 16 Gb memory
N Time-------------2 30m 58s3 22m 36s4 19m 49s5 22m 2s6 23m 13s

Acquired using sar/sysstat
Here's what's happening with -j4:
Basically, the first 15 minutes things are running in parallel, with t i/o slowing things down during the last 5 minutes.

On a six-core AMD Phenom II 1055T with 8 Gb memory
N Time (s)-------------4 34m 16s5 27m 19s6 24m 60s7 30m 18s8 31m 47s


Hardware profiles:
Intel machine:
00:00.0 0600: 8086:0100 (rev 09)00:02.0 0300: 8086:0102 (rev 09)00:16.0 0780: 8086:1c3a (rev 04)00:16.3 0700: 8086:1c3d (rev 04)00:19.0 0200: 8086:1502 (rev 04)00:1a.0 0c03: 8086:1c2d (rev 04)00:1b.0 0403: 8086:1c20 (rev 04)00:1c.0 0604: 8086:1c10 (rev b4)00:1c.2 0604: 8086:1c14 (rev b4)00:1d.0 0c03: 8086:1c26 (rev 04)00:1e.0 0604: 8086:244e (rev a4)00:1f.0 0601: 8086:1c4e (rev 04)00:1f.2 0104: 8086:2822 (rev 04)00:1f.3 0c05: 8086:1c22 (rev 04)

AMD machine:
00:00.0 0600: 1022:960100:01.0 0604: 1022:960200:07.0 0604: 1022:960700:11.0 0106: 1002:439000:12.0 0c03: 1002:439700:12.1 0c03: 1002:439800:12.2 0c03: 1002:439600:13.0 0c03: 1002:439700:13.1 0c03: 1002:439800:13.2 0c03: 1002:439600:14.0 0c05: 1002:4385 (rev 3c)00:14.1 0101: 1002:439c00:14.2 0403: 1002:438300:14.3 0601: 1002:439d00:14.4 0604: 1002:438400:14.5 0c03: 1002:439900:18.0 0600: 1022:120000:18.1 0600: 1022:120100:18.2 0600: 1022:120200:18.3 0600: 1022:120300:18.4 0600: 1022:120401:05.0 0300: 1002:971501:05.1 0403: 1002:970f02:00.0 0200: 10ec:8168 (rev 03)03:05.0 0200: 10ec:8169 (rev 10

Hiç yorum yok:

Yorum Gönder