1 |
On Thu, 30 Apr 2015 20:11:52 +0200 Volker Armin Hemmann wrote: |
2 |
> Am 30.04.2015 um 19:45 schrieb Andrew Savchenko: |
3 |
> > Hi, |
4 |
> > |
5 |
> > On Thu, 30 Apr 2015 18:26:22 +0200 Volker Armin Hemmann wrote: |
6 |
> >> That simple. The kernel is too important and the people programming it |
7 |
> >> know what they are doing. Don't set anything. It is retarded. |
8 |
> >>> - I don't like invoking 'CFLAGS="-O2 -march=foo"make' |
9 |
> >>> - I don't want to set CFLAGS as a persistent environment variable. |
10 |
> >>> - I don't want to modify the kernel Makefile |
11 |
> >>> |
12 |
> >>> Does it actually make sense to set an optimization level and -march? |
13 |
> >> no |
14 |
> > While I completely agree with you that kernel CFLAGS should not be |
15 |
> > randomly tampered with, I can't agree that -march itself is useless. |
16 |
> > Tests and results are available here: |
17 |
> > https://github.com/graysky2/kernel_gcc_patch |
18 |
> > |
19 |
> > Optimization is a very powerful tool if taken with care. Of course |
20 |
> > it may lead to a disastrous result if mindlessly used. |
21 |
> > |
22 |
> > Best regards, |
23 |
> > Andrew Savchenko |
24 |
> |
25 |
> if your mail client or browser is miscompiled, it is crashy, but worst |
26 |
> case, a bunch of emails or bookmarks are lost. |
27 |
> |
28 |
> If the kernel fucks up, it might write across partition boundaries and |
29 |
> destroy ALL your data. Or writes garbage instead of data. |
30 |
> |
31 |
> Don't f* with the kernel. |
32 |
|
33 |
That's why we have tests. Follow the link above. As for a personal |
34 |
experience: we have kernels with this patch and gcc native |
35 |
optimization in production for several years. Results are fine |
36 |
(no kernel related issues). |
37 |
|
38 |
In order not to crash kernel, do not add -ffast-math there. You |
39 |
need to have some understanding before touching such stuff. |
40 |
|
41 |
Best regards, |
42 |
Andrew Savchenko |