Difference between revisions of "Repo-ck"

From ArchWiki
Jump to: navigation, search
(Installation Examples)
(How to Determine Which CPU Optimized Package Set to Select)
(42 intermediate revisions by 3 users not shown)
Line 8: Line 8:
 
{{Article summary wiki|http://repo-ck.com/stats.pdf Repo Statistics}} -  Popularity of packages, # of downloads, etc.
 
{{Article summary wiki|http://repo-ck.com/stats.pdf Repo Statistics}} -  Popularity of packages, # of downloads, etc.
 
{{Article summary end}}
 
{{Article summary end}}
 
== TL; DR Summary ==
 
'''Packages Provided:'''
 
*{{AUR|linux-ck}} - Kernel and headers.
 
*{{AUR|nvidia-ck}} - Matched nVidia modules.
 
*{{AUR|nvidia-304xx-ck}} - Matched nVidia legacy modules.
 
*{{AUR|broadcom-wl-ck}} - Matched broadcom-wl modules.
 
*{{AUR|virtualbox-ck-modules}} - Matched virtualbox-host and virtualbox-guest modules.
 
 
'''CPU-Optimized Flavors:'''
 
*Generic - Any x86_64 or i686 CPU.
 
*Corex - Optimized pacakges for Intel C2D/C2Q/Core i3/i5/i7 CPUs.
 
*Kx - Optimized packages for AMD K7/K8/K10 CPUs.
 
*P4 - Optimized packages for Intel Pentium 4 CPUs.
 
*Pentm - Optimized packages for Intel Pentium-M CPUs.
 
 
'''Setup:'''
 
See the [[Repo-ck#Setup]] section below to enable and use the repo.
 
  
 
== Details ==
 
== Details ==
Line 32: Line 14:
 
Users have a choice between the corresponding generic linux-ck packages or CPU-specific and optimized linux-ck packages:
 
Users have a choice between the corresponding generic linux-ck packages or CPU-specific and optimized linux-ck packages:
  
''GENERIC''
+
{| class="wikitable" align="left"
*'''ck-generic''' ==> Compiled with generic optimizations suitable for ''any'' compatible CPU just like the official ARCH linux package.  This is true for both Intel and AMD processors.
+
|-
 +
! CPU Type !! Group Alias !! Details
 +
|-
 +
| rowspan="1" bgcolor=#e3f7e6| '''<span style="color: #409044;">Generic</span>'''
 +
| ''ck-generic'' || Compiled with generic optimizations suitable for ''any'' compatible CPU just like the official ARCH linux package.  This is true for both Intel and AMD processors.
 +
|-
 +
| rowspan="7" bgcolor=#e3ecf7| '''<span style="color: #2a6dc8;">Intel</span>'''
 +
| ''ck-atom'' || Intel Atom platform specific optimizations.  Intel Atom CPUs have an in-order pipelining architecture and thus can benefit from accordingly optimized code.
 +
|-
 +
| ''ck-core2'' || Intel Core 2-family including Dual and Quads (Core 2/Newer Xeon/Mobile Celeron based on Core2).
 +
|-
 +
| ''ck-nehalem'' || Intel 1st Generation Core i3/i5/i7-family specific optimizations.
 +
|-
 +
| ''ck-sandybridge'' || Intel 2nd Generation Core i3/i5/i7-family specific optimizations.
 +
|-
 +
| ''ck-ivybridge'' ||  Intel 3rd Generation Core i3/i5/i7-family specific optimizations.
 +
|-
 +
| ''ck-p4'' ||  Intel Pentium-4 specific optimizations (P4/P4-based Celeron/Pentium-4 M/Older Xeon).
 +
|-
 +
| ''ck-pentm'' || Intel Pentium-M specific optimizations (Pentium-M notebook chips/not Pentium-4 M).
 +
|-
 +
| rowspan="6" bgcolor=#f7e3e3| '''<span style="color: #e62c2c;">AMD</span>'''
 +
| ''ck-kx'' ||  AMD K7/K8-family specific optimizations.
 +
|-
 +
| ''ck-k10'' ||  AMD 61xx Eight-Core Magny-Cours, Athlon X2 7x50,P henom X3/X4/II, Athlon II X2/X3/X4, or Turion II-family processor.
 +
|-
 +
| ''ck-barcelona'' || CPUs based on AMD Family 10h cores with x86-64 instruction set support.
 +
|-
 +
|''ck-bobcat''|| CPUs based on AMD Family 14h cores with x86-64 instruction set support.
 +
|-
 +
|''ck-bulldozer''|| CPUs based on AMD Family 15h cores with x86-64 instruction set support.
 +
|-
 +
| ''ck-piledriver'' || CPUs based on AMD Family 15h cores with x86-64 instruction set support.
 +
|-
 +
|}
  
''CPU SPECIFIC AND OPTIMIZED''
+
CPU-specific optimization are invoked at compilation by selecting the corresponding option under '''Processor type and features>Processor family''' or by setting-up the .config file accordingly.  These changes setup make specific gcc options including the $CFLAGS.  
*'''ck-atom''' ==> Intel Atom platform specific optimizations.  Intel Atom CPUs have an in-order pipelining architecture and thus can benefit from accordingly optimized code.
+
*'''ck-corex''' ==> Intel Core 2-family including Dual and Quads (Core 2/Newer Xeon/Mobile Celeron based on Core2) and Core i3/i5/i7-family specific optimizations (Gulftown, Bloomfield, Lynnfield, Clarksfield, Arrendale, and Sandy/Ivybridge CPUs).
+
*'''ck-kx''' ==> AMD K7 (Athlon/Athlon XP)/K8 (Athlon 64, Athlon 64 X2, 23xx Quad-Core Barcelona, Sempron, Sempron 64)/K10-family (Athlon X2 7x50, Phenom X3/X4, Phenom II, Athlon II X2/X3/X4, Sempron 64 [Socket AM3 only], 61xx Eight-Core Magny-Cours) specific optimizations.  Enables use of some extended instructions, and passes appropriate optimization flags to GCC.
+
*'''ck-p4''' ==> Intel Pentium-4 specific optimizations (P4/P4-based Celeron/Pentium-4 M/Older Xeon).
+
*'''ck-pentm''' ==> Intel Pentium-M specific optimizations (Pentium-M notebook chips/not Pentium-4 M).
+
 
+
CPU-specific optimization are invoked at compilation by selecting the corresponding option under '''Processor type and features>Processor family''' or by setting-up the .config file accordingly.  These changes setup make specific gcc options including the $CFLAGS. For more, see the following files:
+
 
+
*$srcdir/linux-$pkgver/arch/x86/[http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=arch/x86/Makefile;h=b02e509072a790b1fbea3387f8749b5326beb822;hb=HEAD Makefile]
+
*$srcdir/linux-$pkgver/arch/x86/[http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=arch/x86/Makefile_32.cpu;h=86cee7b749e1bc387522752ba2a5f200ccc172c0;hb=HEAD Makefile_32]
+
  
 
{{Note|Repo packages include the BFQ I/O Scheduler compiled as a module.  Read the [[#How_to_Enable_the_BFQ_I.2FO_Scheduler|section]] below for instructions to load it and enable it should you wish to do so.}}
 
{{Note|Repo packages include the BFQ I/O Scheduler compiled as a module.  Read the [[#How_to_Enable_the_BFQ_I.2FO_Scheduler|section]] below for instructions to load it and enable it should you wish to do so.}}
 
[[http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6D605D846176ED4B Graysky's public key]] used for package signing.  Pacman v4 will automatically query the public key server, but if users would rather download and manually add the key, do so from the link.
 
  
 
== Setup ==
 
== Setup ==
Line 59: Line 63:
  
 
To sign graysky's key, do the following:
 
To sign graysky's key, do the following:
  # pacman-key -r 6176ED4B
+
  # pacman-key -r 5EE46C4C
  # pacman-key --lsign-key 6176ED4B
+
  # pacman-key --lsign-key 5EE46C4C
  
2) Refresh via ''pacman -Syy''
+
2) Refresh via  
 +
# pacman -Syy
  
 
That's it.  To see the contents of the repo, just search as such:
 
That's it.  To see the contents of the repo, just search as such:
Line 69: Line 74:
  
 
== Installation Examples ==
 
== Installation Examples ==
Use the '''ck-X''' group and select the desired packages for installation.  There are 6 groups corresponding to the 6 package sets: '''ck-generic, ck-atom, ck-corex, ck-kx, ck-p4,''' and '''ck-pentm'''.
+
Use the '''ck-X''' group and select the desired packages for installation.  There are 6 groups corresponding to the 13 package sets: '''ck-generic, ck-atom, ck-core2, ck-nehalem, ck-sandybridge, ck-ivybridge, ck-p4, ck-pentm, ck-kx, ck-k10, ck-barcelona, ck-bulldozer, ck-piledriver'''
  
 
{{bc|1=# pacman -S ck-generic
 
{{bc|1=# pacman -S ck-generic
Line 82: Line 87:
 
  # pacman -S linux-ck linux-ck-headers
 
  # pacman -S linux-ck linux-ck-headers
  
== Current CK Package Offerings ==
+
== How to Determine Which CPU Optimized Package Set to Select ==
{| border="1"
+
Users unsure which package set to use can always install the '''ck-generic''' group which will drive any compatible CPU. For those wanting CPU-specific optimized packages, run the following command (assuming that base-devel is installed):
| '''linux-ck and headers''' || '''Group''' || '''x86_64''' || '''i686'''|| '''Processor Family Specific Optimizations/Description'''
+
 
 +
$ gcc -c -Q -march=native --help=target | grep march
 +
 
 +
The resulting value is what gcc would use as the march CFLAG.  Refer to the table below for a mapping of this value to the correct group.
 +
 
 +
{| class="wikitable" align="center"
 
|-
 
|-
| [https://aur.archlinux.org/packages/linux-ck linux-ck] || ck-generic || Yes || Yes || Compiled with generic optimizations suitable for ''any'' compatible CPU just like the official ARCH linux package.
+
! Brand !! Group !! March
 +
|-
 +
| rowspan="7" bgcolor=#e3ecf7| '''<span style="color: #2a6dc8;">Intel</span>'''
 +
| ''ck-atom'' || atom
 
|-  
 
|-  
| linux-ck-atom || ck-atom || Yes || Yes || Intel Atom platform specific optimizations.
+
| ''ck-core2'' || core2
 
|-  
 
|-  
| linux-ck-corex || ck-corex || Yes || Yes || Intel Core X-family specific optimizations including Dual and Quads (Core 2/Newer Xeon/Mobile Celeron based on Core2) as well as Intel Core i3/i5/i7.
+
| ''ck-nehalem'' || corei7
 
|-  
 
|-  
| linux-ck-kx || ck-kx || Yes || Yes || AMD K7 (Athlon/Athlon XP), K8 (Athlon 64, Athlon 64 X2, 23xx Quad-Core Barcelona, Sempron, Sempron 64), and K10-family (Athlon X2 7x50, Phenom X3/X4, Phenom II, Athlon II X2/X3/X4, Sempron 64 (Socket AM3 only), 61xx Eight-Core Magny-Cours) specific optimizations.
+
| ''ck-sandybridge'' || corei7-avx
|-
+
| linux-ck-p4 || ck-p4 || Yes || Yes || Intel Pentium-4 specific optimizations (P4/P4-based Celeron/Pentium-4 M/Older Xeon).
+
|-
+
| linux-ck-pentm || ck-pentm || N/A || Yes || Intel Pentium-M specific optimizations (Pentium-M notebook chips/not Pentium-4 M).
+
|-
+
| || || || ||
+
|-
+
| '''Nvidia-ck Module''' || '''Group''' || '''x86_64''' || '''i686'''|| '''Description'''
+
|-
+
| [https://aur.archlinux.org/packages/nvidia-ck nvidia-ck] || ck-generic || Yes || Yes || The matching nVidia kernel module based on 310.xx series of Official nVidia drivers for linux-ck.
+
|-
+
| nvidia-ck-atom || ck-atom || Yes || Yes ||
+
|-
+
| nvidia-ck-corex || ck-corex || Yes || Yes ||
+
|-
+
| nvidia-ck-kx || ck-kx || Yes || Yes ||
+
|-
+
| nvidia-ck-p4 || ck-p4  || Yes || Yes ||
+
|-
+
| nvidia-ck-pentm || ck-pentm || N/A || Yes ||
+
 
|-  
 
|-  
| || || || ||
+
| ''ck-ivybridge'' || core-avx-i
|-
+
| '''Nvidia-304xx-ck Module''' || '''Group''' || '''x86_64''' || '''i686'''|| '''Description'''
+
|-
+
| [https://aur.archlinux.org/packages/nvidia-304xx-ck  nvidia-304xx-ck] || ck-generic || Yes || Yes || The matching nVidia legacy kernel module based on 304.xx series of Official nVidia drivers for linux-ck.
+
|-
+
| nvidia-304xx-ck-atom || ck-atom || Yes || Yes ||
+
|-
+
| nvidia-304xx-ck-corex || ck-corex || Yes || Yes ||
+
|-
+
| nvidia-304xx-ck-kx || ck-kx || Yes || Yes ||
+
|-
+
| nvidia-304xx-ck-p4 || ck-p4  || Yes || Yes ||
+
|-
+
| nvidia-304xx-ck-pentm || ck-pentm || N/A || Yes ||
+
 
|-  
 
|-  
| || || || ||
+
| ''ck-p4'' || pentium4
|-
+
|-  
| '''Broadcom-wl-ck Module''' || '''Group''' ||  '''x86_64''' || '''i686'''|| '''Description'''
+
| ''ck-pentm'' || ?
|-
+
| [https://aur.archlinux.org/packages/broadcom-wl-ck broadcom-wl-ck] || ck-generic ||  Yes || Yes || The matching Broadcom-wl-ck kernel module for linux-ck.
+
|-
+
| broadcom-wl-ck-atom || ck-atom ||  Yes || Yes ||
+
|-
+
| broadcom-wl-ck-corex || ck-corex || Yes || Yes ||
+
|-
+
| broadcom-wl-ck-kx || ck-kx || Yes || Yes ||
+
|-
+
| broadcom-wl-ck-p4 || ck-p4 || Yes || Yes ||
+
|-
+
| broadcom-wl-ck-pentm || ck-pentm || N/A || Yes ||
+
 
|-  
 
|-  
| || || || ||
+
| rowspan="6" bgcolor=#f7e3e3| '''<span style="color: #e62c2c;">AMD</span>'''
 +
| ''ck-kx'' || athlon, athlon-4, athlon-tbird, athlon-mp, athlon-xp
 
|-  
 
|-  
| '''Virtualbox-ck-modules (guest and host)''' || '''Group''' || '''x86_64''' || '''i686'''|| '''Description'''
+
| ''ck-k10'' || amdfam10
 +
|-
 +
| ''ck-barcelona'' || barcelona
 
|-
 
|-
| [https://aur.archlinux.org/packages/virtualbox-ck-modules virtualbox-ck-guest-modules and virtualbox-ck-host-modules] || ck-generic ||  Yes || Yes || The matching virtualbox guest and hosts kernel modules for linux-ck.
+
|''ck-bobcat''|| btver1
 
|-
 
|-
| virtualbox-ck-guest-modules-atom and virtualbox-ck-host-modules-atom || ck-atom || Yes || Yes ||
+
|''ck-bulldozer''|| bdver1
|-
+
| virtualbox-ck-guest-modules-corex and virtualbox-ck-host-modules-corex || ck-corex || Yes || Yes ||
+
|-
+
| virtualbox-ck-guest-modules-kx and virtualbox-ck-host-modules-kx || ck-kx || Yes || Yes ||
+
|-
+
| virtualbox-ck-guest-modules-p4 and virtualbox-ck-host-modules-p4 || ck-p4 || Yes || Yes ||
+
|-
+
| virtualbox-ck-guest-modules-pentm and virtualbox-ck-host-modules-pentm || ck-pentm || N/A || Yes ||
+
 
|-
 
|-
 +
| ''ck-piledriver'' || bdver2
 +
|-
 
|}
 
|}
  
''N/A = Not Available due to hardware limitations.''
+
{{Note|Users are encouraged to add additional entries to this table.}}
 +
 
 +
Additional links can be used to help determine which package set to select:
 +
 
 +
*http://en.gentoo-wiki.com/wiki/Safe_Cflags/Intel
 +
*http://en.gentoo-wiki.com/wiki/Safe_Cflags/AMD
 +
*http://www.linuxforge.net/docs/linux/linux-gcc.php
 +
*http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html
 +
 
 +
== How Much Faster Are the CPU Optimized Packages ==
 +
The answer is not ''that'' much faster. Extensive testing comparing the effect of gcc compile options on resulting binaries have been conducted by others with varying result from no change to rather significant speed ups.
 +
 
 +
*[http://www.phoronix.com/scan.php?page=home phoronix labs]
 +
*[https://bbs.archlinux.org/viewtopic.php?id=154333 Kernel patch for more CPU families offers measurable speed increases].
 +
 
 +
Readers are encouraged to add to this list.
  
 
== How to Enable the BFQ I/O Scheduler ==
 
== How to Enable the BFQ I/O Scheduler ==
Line 172: Line 151:
  
 
Add {{ic|1=elevator=bfq}} to boot loader [[Kernel parameters]].
 
Add {{ic|1=elevator=bfq}} to boot loader [[Kernel parameters]].
 +
{{Note|Users building the PKG from the AUR have an option in the PKGBUILD itself to globally use the BFQ as the default I/O scheduler.}}
  
 
=== Selectively (for only specified devices) ===
 
=== Selectively (for only specified devices) ===
{{Note|Users building the PKG from the AUR have an option in the PKGBUILD itself to globally use the BFQ as the default I/O scheduler.}}
 
  
 
Direct the kernel to use it on a device-by-device basis.  For example, to enable it for {{ic|/dev/sda}} simply:
 
Direct the kernel to use it on a device-by-device basis.  For example, to enable it for {{ic|/dev/sda}} simply:

Revision as of 22:48, 2 January 2013

Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary wiki - Main article. Template:Article summary wiki - Linux-ck Changelog. Template:Article summary wiki - Popularity of packages, # of downloads, etc. Template:Article summary end

Details

The repo contains generic packages as well as CPU-specific packages. Many ARCH users are familiar with the concept of a generic kernel package. The official ARCH kernel is available in two flavors (either i686 or x86_64) which are generic packages in that i686 will work with any compatible x86 CPU and x86_64 will work with any compatible x86_64 CPU.

Users have a choice between the corresponding generic linux-ck packages or CPU-specific and optimized linux-ck packages:

CPU Type Group Alias Details
Generic ck-generic Compiled with generic optimizations suitable for any compatible CPU just like the official ARCH linux package. This is true for both Intel and AMD processors.
Intel ck-atom Intel Atom platform specific optimizations. Intel Atom CPUs have an in-order pipelining architecture and thus can benefit from accordingly optimized code.
ck-core2 Intel Core 2-family including Dual and Quads (Core 2/Newer Xeon/Mobile Celeron based on Core2).
ck-nehalem Intel 1st Generation Core i3/i5/i7-family specific optimizations.
ck-sandybridge Intel 2nd Generation Core i3/i5/i7-family specific optimizations.
ck-ivybridge Intel 3rd Generation Core i3/i5/i7-family specific optimizations.
ck-p4 Intel Pentium-4 specific optimizations (P4/P4-based Celeron/Pentium-4 M/Older Xeon).
ck-pentm Intel Pentium-M specific optimizations (Pentium-M notebook chips/not Pentium-4 M).
AMD ck-kx AMD K7/K8-family specific optimizations.
ck-k10 AMD 61xx Eight-Core Magny-Cours, Athlon X2 7x50,P henom X3/X4/II, Athlon II X2/X3/X4, or Turion II-family processor.
ck-barcelona CPUs based on AMD Family 10h cores with x86-64 instruction set support.
ck-bobcat CPUs based on AMD Family 14h cores with x86-64 instruction set support.
ck-bulldozer CPUs based on AMD Family 15h cores with x86-64 instruction set support.
ck-piledriver CPUs based on AMD Family 15h cores with x86-64 instruction set support.

CPU-specific optimization are invoked at compilation by selecting the corresponding option under Processor type and features>Processor family or by setting-up the .config file accordingly. These changes setup make specific gcc options including the $CFLAGS.

Note: Repo packages include the BFQ I/O Scheduler compiled as a module. Read the section below for instructions to load it and enable it should you wish to do so.

Setup

1) Add the following to /etc/pacman.conf (I placed my entry at the bottom of the file):

[repo-ck]
SigLevel = PackageRequired
Server = http://repo-ck.com/$arch

To sign graysky's key, do the following:

# pacman-key -r 5EE46C4C
# pacman-key --lsign-key 5EE46C4C

2) Refresh via

# pacman -Syy

That's it. To see the contents of the repo, just search as such:

$ pacman -Sl repo-ck

Installation Examples

Use the ck-X group and select the desired packages for installation. There are 6 groups corresponding to the 13 package sets: ck-generic, ck-atom, ck-core2, ck-nehalem, ck-sandybridge, ck-ivybridge, ck-p4, ck-pentm, ck-kx, ck-k10, ck-barcelona, ck-bulldozer, ck-piledriver

# pacman -S ck-generic
:: There are 7 members in group ck-generic:
:: Repository repo-ck
   1) broadcom-wl-ck  2) linux-ck  3) linux-ck-headers  4) nvidia-304xx-ck  5) nvidia-ck
   6) virtualbox-ck-guest-modules  7) virtualbox-ck-host-modules

Enter a selection (default=all):

Alternatively, simply direct pacman to install the packages directly:

# pacman -S linux-ck linux-ck-headers

How to Determine Which CPU Optimized Package Set to Select

Users unsure which package set to use can always install the ck-generic group which will drive any compatible CPU. For those wanting CPU-specific optimized packages, run the following command (assuming that base-devel is installed):

$ gcc -c -Q -march=native --help=target | grep march

The resulting value is what gcc would use as the march CFLAG. Refer to the table below for a mapping of this value to the correct group.

Brand Group March
Intel ck-atom atom
ck-core2 core2
ck-nehalem corei7
ck-sandybridge corei7-avx
ck-ivybridge core-avx-i
ck-p4 pentium4
ck-pentm  ?
AMD ck-kx athlon, athlon-4, athlon-tbird, athlon-mp, athlon-xp
ck-k10 amdfam10
ck-barcelona barcelona
ck-bobcat btver1
ck-bulldozer bdver1
ck-piledriver bdver2
Note: Users are encouraged to add additional entries to this table.

Additional links can be used to help determine which package set to select:

How Much Faster Are the CPU Optimized Packages

The answer is not that much faster. Extensive testing comparing the effect of gcc compile options on resulting binaries have been conducted by others with varying result from no change to rather significant speed ups.

Readers are encouraged to add to this list.

How to Enable the BFQ I/O Scheduler

Since release 3.0.4-2, the BFQ patchset is applied to the package by default. Users must enable the BFQ scheduler to use it; it is dormant by default.

Globally (for all devices)

Add elevator=bfq to boot loader Kernel parameters.

Note: Users building the PKG from the AUR have an option in the PKGBUILD itself to globally use the BFQ as the default I/O scheduler.

Selectively (for only specified devices)

Direct the kernel to use it on a device-by-device basis. For example, to enable it for /dev/sda simply:

# echo bfq > /sys/block/sda/queue/scheduler

To confirm, simply cat the same file:

# cat /sys/block/sda/queue/scheduler
noop deadline cfq [bfq] 

Setting this way will not survive a reboot. To make the change automatically at the next system boot, create the following tmpfile where "X" is the letter for the SSD device.

 /etc/tmpfiles.d/set_IO_scheduler.conf 
w /sys/block/sdX/queue/scheduler - - - - noop

Package Trivia/Repo Statistics

  • Various package sets are compiled via a Bash wrapper script for makepkg. The script is publicly accessible at graysky's github repo.
  • Repo statistics are available (popularity of packages, which CPU is most popular, # of downloads, etc.).
Note: The statistics are not updated daily but do give a snapshot of the data.

Troubleshooting

Forum Support

Please use this discussion thread to voice comments, questions, suggestions, requests, etc. Note from graysky, "I can add other CPU-specific builds upon request. I just wanna be sure people will actually use them if I take the time to compile them."