Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] CPU upgrade and LVM questions.
Date: Thu, 06 Dec 2018 20:58:18
Message-Id: f9fb79fd-31c9-7f73-f342-79adb8d677ab@gmail.com
In Reply to: Re: [gentoo-user] CPU upgrade and LVM questions. by Corbin Bird
1 Hi,
2
3 I think that is how I got the flags for the current CPU.  Those commands
4 look familiar.  Since then, I think cpuid2cpuflags can do most of it,
5 tho it does seem to fall short on some flags.  The way you did it
6 reveals a lot more details. 
7
8 My concern is this tho.  I have my old CPU still installed and
9 everything is compiled based on that.  So, I'm stable with the old CPU. 
10 However, when I shutdown, take out the old CPU and install the new one,
11 I'm concerned it may not boot at all because of the change or may boot
12 but be very unstable.  I recall years ago being able to set up the flags
13 in such a way that it can run on virtually any CPU but it's been a long
14 time ago and I don't know if it is needed or not.  My hope was, someone
15 did a very similar upgrade and can say for sure if it works or if I need
16 to do things before changing the CPUs to make sure I can boot and be
17 stable.  If I can just get a stable console, I can do a emerge -e world
18 and get the OS inline with the CPU.  I'm just concerned whether I will
19 have that or not. 
20
21 I should be current on gcc.  I just updated the other day and update
22 once a week.  I used to do more often but time isn't as plentiful as it
23 used to be. 
24
25 I just don't want to swap CPUs only to find out I've got to swap back
26 because my system won't boot at all. Heck, it may even fail to load the
27 kernel itself for all I know. 
28
29 Dale
30
31 :-)  :-) 
32
33
34
35
36 Corbin Bird wrote:
37 > My two cents worth :
38 >
39 > Update gcc before changing any hardware.
40 >
41 > With gcc somewhat current, try this on the replacement CPU.
42 > This gives a listing of all CPU supported compiler flags.
43 > Including -mtune / -march :)
44 >
45 > gcc -c -Q -march=native --help=target
46 >
47 > sample of output :
48 >
49 > -msse4 [enabled]
50 > -msse4.1 [enabled]
51 > -msse4.2 [enabled]
52 > -msse4a [enabled]
53 > -msse5
54 > -msseregparm [disabled]
55 > -mssse3 [enabled]
56 > -mstack-arg-probe [disabled]
57 > -mstack-protector-guard= tls
58 > -mstackrealign [disabled]
59 > -mstringop-strategy= [default]
60 > -mstv [enabled]
61 > -mtbm [enabled]
62 > -mtls-dialect= gnu
63 > -mtls-direct-seg-refs [enabled]
64 > -mtune-ctrl=
65 > -mtune= bdver2
66 > -muclibc [disabled]
67 > -mveclibabi= [default]
68 > -mvect8-ret-in-mem [disabled]
69 > -mvzeroupper [enabled]
70 > -mx32 [disabled]
71 > -mxop [enabled]
72 > -mxsave [enabled]
73 > -mxsavec [disabled]
74 > -mxsaveopt [disabled]
75 > -mxsaves [disabled]
76 >
77 >
78 > This will give you the L1 / L2 cache/line/size parameters :
79 >
80 > gcc -### -march=native /usr/include/stdlib.h
81 >
82 > sample of output :
83 >
84 > gcc version 7.3.0 (Gentoo 7.3.0-r3 p1.4)
85 > COLLECT_GCC_OPTIONS='-march=native'
86 > /usr/libexec/gcc/x86_64-pc-linux-gnu/7.3.0/cc1 -quiet
87 > /usr/include/stdlib.h "-march=bdver2" -mmmx -mno-3dnow -msse -msse2
88 > -msse3 -mssse3 -msse4a -mcx16 -msahf -mno-movbe -maes -mno-sha -mpclmul
89 > -mpopcnt -mabm -mlwp -mfma -mfma4 -mxop -mbmi -mno-sgx -mno-bmi2 -mtbm
90 > -mavx -mno-avx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle -mno-rdrnd
91 > -mf16c -mno-fsgsbase -mno-rdseed -mprfchw -mno-adx -mfxsr -mxsave
92 > -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf
93 > -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq
94 > -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi
95 > -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mno-mwaitx -mno-clzero
96 > -mno-pku -mno-rdpid --param "l1-cache-size=16" --param
97 > "l1-cache-line-size=64" --param "l2-cache-size=2048" "-mtune=bdver2"
98 > -quiet -dumpbase stdlib.h -auxbase stdlib -o /tmp/ccQiaXih.s
99 > "--output-pch=/usr/include/stdlib.h.gch"
100 >
101 >
102 > Reference Link : https://wiki.gentoo.org/wiki/GCC_optimization
103 >
104 > On 12/6/18 3:27 AM, Dale wrote:
105 >> Howdy,
106 >>
107 >> I mentioned in other threads that I'm doing some upgrades to my system. 
108 >> My first question is about a CPU upgrade.  I currently have this for my
109 >> CPU, from cpuinfo:
110 >>
111 >> AMD Phenom(tm) II X4 955 Processor
112 >>
113 >> Those were put there ages ago, likely when I built and installed Gentoo
114 >> on this rig.  Do I need to change those to something that is compatible
115 >> with both CPUs and then change to the new CPU after it is installed?  Or
116 >> will the new CPU be close enough that it won't matter?  Right now, I
117 >> don't know for sure what the new CPU supports or doesn't. 
118 >>
119 >

Replies

Subject Author
Re: [gentoo-user] CPU upgrade and LVM questions. Jack <ostroffjh@×××××××××××××××××.net>
Re: [gentoo-user] CPU upgrade and LVM questions. Corbin Bird <corbinbird@×××××××.net>