Gentoo Archives: gentoo-dev

From: Tom Wijsman <TomWij@g.o>
To: gentoo-dev@l.g.o
Cc: gentoo-kernel@l.g.o, kernel@g.o
Subject: [gentoo-dev] Proper distribution integration of kernel *-sources, patches and configuration.
Date: Mon, 01 Jul 2013 14:42:23
Message-Id: 20130701164149.131490f8@TOMWIJ-GENTOO
1 Hello
2
3
4 Please reply to gentoo-dev in case ML daemon changes Reply-To.
5
6
7 ### TL; DR ###
8
9 By introducing feature patches which menu options are disabled by
10 default to genpatches, we can deduplicate *-sources maintainers as well
11 as large groups of users work. By introducing a distribution section
12 in the menuconfig, we can provide options that enable minimal Gentoo
13 requirements by default (DEVTMPFS, making Gentoo systems bootable since
14 an udev release a long time ago) and other distribution stuff.
15
16
17 ### Proper distribution integration of kernel *-sources, patches ... ###
18
19 Gentoo is a distribution; but what is a distribution that doesn't
20 properly integrate what it provides, but instead expects its users to
21 do so, needlessly duplicating work amongst its maintainers and users.
22
23 Let's say I want genpatches, aufs and TuxOnIce; closest candidates:
24
25 - sys-kernel/aufs-sources: genpatches, aufs
26 - sys-kernel/pf-sources: genpatches, CK, BFQ, BFQ, TuxOnIce, UKSM
27 - sys-kernel/tuxonice-sources: genpatches, TuxOnIce
28
29 What do I do? Take one (eg. aufs) and apply the other (eg. TuxOnIce)?
30 What if I want to add another common patchset to it? Hardened perhaps?
31
32 You can see, some of these sources (like pf-sources) already attempt to
33 do so; with pf-sources in mind, why do we even have ck-sources,
34 tuxonice-sources in the Portage tree? Just to duplicate work?
35
36 I think we should trim down on the amount of *-sources and combine
37 multiple patches into genpatches. Take an example of geek-sources
38 which does all this without a problem; I don't really like the approach
39 with USE flags used there, as the menuconfig can just cover that.
40
41 https://github.com/init6/init_6/wiki/geek-sources
42
43 What does a patch introducing new features really do? Or rather, what
44 should it do when we add it? Let me summarize:
45
46 1) The features should be disabled by default.
47 2) These feature should depend on a non-vanilla / experimental option.
48 3) The patch should not affect the build by default.
49 4) The user can optionally enable the feature.
50
51 So, in genpatches, since 3.9.7, BFQ was added to try this out (except
52 2.). Ensured it to be disabled by default, did not affect the build for
53 anyone that does not enable it and the users have been enabling and
54 using it on their own. So, does it differentiate more from vanilla? No.
55
56 This helps users as well as maintainers to not have to apply BFQ on
57 their own, they simply have to tick a config option and they are set.
58 If all patches that introduce new features are added in this fashion,
59 it spares large groups of users from having to do this on their own; we
60 can also deduplicate the work in the Portage tree this way.
61
62
63 ### ... and configuration. ###
64
65 This problem is not only visible for patches, but also in the config.
66
67 Meet CONFIG_DEVTMPFS; forget to enable it, greet a failing boot. We're
68 telling users to enable it in some places, in the handbook it's a single
69 line you must read, on the Wiki it's kind of missing unless you are
70 luckily on the right page, on the Quick Install book it is missing too.
71
72 So, we are currently providing a configuration that expects anyone to
73 enable CONFIG_DEVTMPFS. But you have to remember that it need to make
74 sure you read about it or enable it from the udev upgrade a while ago
75 if you decide to start from a fresh config or are installing without
76 that handbook you kind of have memorized.
77
78 Searching for CONFIG_DEVTMPFS in the forums and #gentoo logs shows that
79 this is quite often suggested as a fix and quite often actually fixes
80 an user's boot. Why duplicate telling users to do that if we can do it?
81
82 There are a small set of other variables in this nature, mostly *TMPFS*.
83
84 This is why I think it would be handy to add a Gentoo section to the
85 kernel, along the lines as described by Linus.
86
87 https://lkml.org/lkml/2012/7/13/369
88
89 The same goes for asking the user to enable configuration options in the
90 kernel, why can't we just tell him to enable all option that toggles
91 support for the user. For example; in the Gentoo section, there would be
92 a "Init System Support" under which you can toggle an option to support
93 the minimal requirements for some init system.
94
95 Feedback is very welcome.
96
97 P.S.: Not everything in this mail has been acked by the kernel lead;
98 only some thoughts, I was suggested to take this to ML for discussion.
99 The usage of the word 'we' in this mail is therefore hypothetical.
100
101
102 ### F.A.Q. ###
103
104 Q: I don't want feature X? Please don't add the patch!
105
106 A: It's optional, don't enable it in your menu config.
107
108 Q: What about my stable server? I really don't want to run this stuff!
109
110 A: These options would depend on !CONFIG_VANILLA or CONFIG_EXPERIMENTAL
111 which would be disabled by default, therefore if you keep this option
112 the way it is on your stable server; it won't affect you.
113
114 In other words, genpatches stay as stable as before; unless you
115 explicitly toggle options that intentionally make it unstable.
116
117 Q: Genpatches used to be minimal, would it gain weight?
118
119 A: If you don't enable those options, it would be as minimal as before;
120 this gives the user the choice between minimal and fat.
121
122 Q: What about patches that fail to build / run?
123
124 A: For testing kernels (~), we would do our best to make them work but
125 there could be occasions where we will have to cut them; this is no
126 different from how the kernel herd has been handling this before, we
127 have already dropped fbcondecor in the past when it was broken and
128 the current new branch 3.10 does not support deblob yet.
129
130 For stable kernels, which are near the EOL of a branch; if the
131 feature isn't still there yet then it means that its author is
132 simply no longer working on it, this is no different from when the
133 patch would be in another *-sources or manually applied by the user.
134
135 If you are unaware of how upstream releases work, just note that
136 the major patch between 3.9.8 and 3.10.0 introduces a lot more
137 changes are applied than the minor patch between 3.9 and 3.9.8;
138 therefore, we prefer to stabilize 3.9.8 or a later 3.9 kernel than
139 stabilizing 3.10.0. You can see this pattern in history; the
140 previous three have been 3.6.11, 3.7.10 and 3.8.13.
141
142 Q: Can't you do something about those build and runtime failures?
143 I like to run testing, but I don't want breaks half of the time.
144
145 A: To cover this, live ebuilds help, 3.10.9999 and 3.9999 and 9999;
146 the earlier ones tracking the stable queues, whereas the last one
147 tracking the upstream rc kernel. This way we can notice what fails
148 in advance and make it working by the time it reaches testing (~).
149
150 That being said, it is to be expected that things are not always
151 fine very early in a branch; it's why those kernels are never stable.
152
153 Q: What about kernel bugs, how would you know the user enabled them?
154
155 A: We expect the .config to be provided, which we can run a sanity
156 check on; it's much more handy if we are aware of these patches than
157 that we have to figure out the user applies it on their own.
158
159 Q: Are documentation / infrastructure / eclass changes necessary?
160
161 A: The kernel project documentation has to be updated to reflect this;
162 no infrastructure or eclass changes are needed, since this is all
163 done through patches in genpatches. (Sub directories supported afaik)
164
165 Q: Does this affect kernel stabilization or QA?
166
167 A: No, experimental features (which would include these optional
168 features) have historically never been looked at by the arch teams;
169 if you can remember, there used to be an CONFIG_EXPERIMENTAL option
170 in the kernel to cover this. For example, you can find yourself
171 running some pretty unstable code if you use 3.8.13 and enable
172 Nouveau reclocking and power management; there are some options in
173 the menuconfig that follow this nature.
174
175 As there would be less *-sources as a consequence; less has to be
176 taken into consideration for stabilization, this is why most
177 *-sources are currently unstable, because we don't have the
178 resources to be stabilizing them all.
179
180 For QA, I don't really see a problem.
181
182 Q: So, would this make vanilla-sources the new gentoo-sources?
183
184 A: No, vanilla-sources undergoes some changes to more closely reflect
185 the upstream kernels; as a consequence, it would no longer have
186 stable kernels and older versions will drop more often. You can read
187 this request and the resulting discussion at the following link.
188
189 http://thread.gmane.org/gmane.linux.gentoo.kernel/697
190
191 The kernel lead summarized a part of this.
192
193 http://thread.gmane.org/gmane.linux.gentoo.kernel/697/focus=730
194
195 Q: Is this a one man army comedy show?
196
197 A: One man army comedy shows work, see geek-sources; if you want to
198 look at some examples of what a one man army can do, the following
199 link is a good read to go through.
200
201 http://www.bennorthrop.com/Essays/2013/pair-programming-my-personal-nightmare.php
202
203 But joking aside; no, we are not.
204
205 We are at least with two on the kernel herd and a third developer is
206 likely to join in the near future; on top of that, other people are
207 welcome and I think it would be nice to see maintainers from
208 *-sources jump in to help along. genpatches isn't hard to maintain.
209
210 Since we're no longer a one man army, we can do more.
211
212 --
213 With kind regards,
214
215 Tom Wijsman (TomWij)
216 Gentoo Developer
217
218 E-mail address : TomWij@g.o
219 GPG Public Key : 6D34E57D
220 GPG Fingerprint : C165 AF18 AB4C 400B C3D2 ABF0 95B2 1FCD 6D34 E57D

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies