/[packages]/cauldron/kernel-joeghi/current/SOURCES/README.kernel-joeghi.md
ViewVC logotype

Contents of /cauldron/kernel-joeghi/current/SOURCES/README.kernel-joeghi.md

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1394740 - (show annotations) (download)
Mon Apr 22 16:18:38 2019 UTC (3 weeks, 6 days ago) by ghibo
File size: 5484 byte(s)
Update to release 4.9.170
1 # kernel-joeghi
2
3 This is an experimental kernel for Mageia GNU/Linux with *low latency*
4 features.
5
6 As you might already know, over the years, a certain amount of
7 external patchsets were available for building Linux kernels with some
8 kind of "real-time" or "low-latency" features. This kernel tries to
9 incorporate some of them. Many projects of this kind already exist
10 over the net with the same aims, either as a kernel with patches
11 merged-in (zen, pf-linux, etc.) or as an extra kernel package built
12 for a specific distribution.
13
14 Most of this job was inspired by the Thomas Backlund's "kernel-tmb"
15 RPM kernels, and Nicolò Costanza's "kernel-nrjQL" RPM kernels,
16 without whom this work wouldn't have been possible. To them goes my
17 gratitude.
18
19 Note this kernel differs from the current Mageia kernel-tmb's kernel
20 by the fact that it uses the Mageia "kernel-desktop" as
21 starting point, then it tries to add the extra patchsets, some of which
22 were not included in kernel-tmb. Note also that this kernel is not
23 intended to be a replacement for kernel-tmb.
24
25 Actually, with respect to the stock mageia kernel-desktop, this kernel
26 includes mainly:
27
28 * Con Kolivas's MuQSS patchset for low latency scheduler. This is
29 actually included in latest kernel-tmb **too**. See:
30
31 * [http://ck.kolivas.org/patches/muqss/4.0/4.9](http://ck.kolivas.org/patches/muqss/4.0/4.9/)
32 * [https://github.com/ckolivas/linux](https://github.com/ckolivas/linux/)
33
34 * TOI (Tux On Ice) for special hybernation. See:
35
36 * [https://github.com/NigelCunningham/tuxonice-kernel/tree/tuxonice-4.9](https://github.com/NigelCunningham/tuxonice-kernel/tree/tuxonice-4.9)
37
38 * Graysky2 for extra gcc optimization. See:
39
40 * [https://github.com/graysky2/kernel_gcc_patch](https://github.com/graysky2/kernel_gcc_patch)
41
42 as well as the Building Notes.
43
44 * NVME patchset for low power consumption of NVME disks when in
45 idle state. See:
46
47 * [https://github.com/damige/linux-nvme](https://github.com/damige/linux-nvme)
48
49 * Jans Axboe's Buffered WriteBack Throttling. See:
50
51 * [http://brick.kernel.dk/snaps/wb-buf-throttle-v8.patch](http://brick.kernel.dk/snaps/wb-buf-throttle-v8.patch)
52
53 though is disabled for BFQ and CFQ I/O schedulers because of performance drops.
54
55 * The default TCP Traffic Congestion Control algorithm was changed from "cubic"
56 to "bbr". Also other algorithms were made available.
57
58 * [The Holger Hoffstätte patchset](https://github.com/hhoffstaette/kernel-patches).
59 This includes brtfs, ext4, xfs, memory management, block, scheduler and other
60 cleanups and performance improvements backported from kernel 4.10+.
61
62
63 ### Building Notes for developers
64
65 Since it wouldn't be possible for the Building System to provide in an easy way
66 a kernel package for a specific CPU family (``-march=native`` would result in
67 the CPU of the building system), the RPM SPEC file contains four new
68 conditional building flags that can used for quickly rebuilding
69 the RPM package optimized for their own CPU. While this provide tiny
70 optimization over the generic one, the Graysky2 benchmarks have
71 reported a very very tiny speed up. These extra building flags are:
72
73 * ``--with gcc_native``: optimizes for the native CPU
74
75 * ``--with gcc_broadwell``: optimizes for the Intel CPU Broadwell
76
77 * ``--with gcc_atom``: optimizes for the Intel CPU Atom. Atom
78 has *in-order* pipelining while most of CPU supports
79 *out-of-order* pipelining, so worthwhile to compile for Atom with
80 this custom building flag.
81
82 * ``--with gcc_harder_opt``: add extra ``-O3`` to the gcc optimization;
83 this is usually not adviced for production as might produce a
84 broken kernel, but you may try as an experiment (to me it worked ;-)).
85
86 E.g. rebuilding the kernel package with "``bm -l --with gcc_broadwell
87 kernel-joeghi.spec``", will rebuild the kernel optimized for the Broadwell
88 CPU family. For example using "``bm -l --with gcc_atom --with gcc_harder_opt
89 kernel-joeghi.spec``" will rebuild the kernel optimized for CPU Atom (at
90 64bit) and will also push the extra ``-O3`` compiler
91 optimization. While "``bm -l --with gcc_native kernel-joeghi.spec``" will
92 auto-detect the CPU family of the system you are running on and will rebuild the
93 kernel optimized for that CPU.
94
95 Note that optimizing for the Broadwell CPU family is
96 the highest Intel CPU supported by the Mageia's gcc 5.4. Newer CPUs
97 based on SkyLake or KabyLake will have to rely, at most, on the
98 Broadwell optimization, or would require a newer gcc version.
99
100 ### Notes
101 For selecting an alternative **TCP traffic congestion control algorithm**,
102 you have to load the kernel module of the corresponding algorithm, e.g.
103
104 modprobe tcp_yeah tcp_htcp
105
106 then check for available algorithms, e.g. using this command:
107
108 sysctl net.ipv4.tcp_available_congestion_control
109
110 will return something like:
111
112 net.ipv4.tcp_available_congestion_control = bbr reno cubic westwood veno vegas yeah htcp
113
114 Now you can select the choosen algorithm, with:
115
116 sysctl -w net.ipv4.tcp_congestion_control=yeah
117
118 Actually this kernel is provided and tested only for the *x86_64*
119 architecture. Note that exploring the kernel parameters to seek for
120 optimum values under certain circumstances is a pretty long and hard
121 work. It requires testing, benchmarking, patience, and mainly exchanging
122 experience each other. There are always room for improvements, so I suggest
123 to try yourself tweaking some parameter and experience new performance
124 improvements.
125
126 Enjoy.
127
128 ###### Author: Giuseppe Ghibò <ghibo at mageia.org>

  ViewVC Help
Powered by ViewVC 1.1.26