You are not logged in.

#1 2022-11-28 15:28:45

enihcam
Member
From: Internet
Registered: 2009-12-20
Posts: 220

[closed] Will Arch transition to x86-64-v2 CPU requirement?

Will Arch transition to x86-64-v2 CPU requirement, just like OpenSUSE?

https://www.phoronix.com/news/openSUSE- … -x86-64-v2


refs:
x86-64    baseline    All x86-64 CPUs    CMOV, CMPXCHG8B, FPU, FXSR, MMX, FXSR, SCE, SSE, SSE2
x86-64-v2    circa 2009    Nehalem / Jaguar    CMPXCHG16B, LAHF-SAHF, POPCNT, SSE3, SSE4.1, SSE4.2, SSSE3
x86-64-v3    circa 2015    Haswell / Excavator    AVX, AVX2, BMI1, BMI2, F16C, FMA, LZCNT, MOVBE, XSAVE

Last edited by enihcam (2023-01-27 02:26:20)

Offline

#2 2022-11-28 15:29:36

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,094

Re: [closed] Will Arch transition to x86-64-v2 CPU requirement?

No, the plan is v3 alongside base x86-64

Offline

#3 2022-11-28 15:31:25

enihcam
Member
From: Internet
Registered: 2009-12-20
Posts: 220

Re: [closed] Will Arch transition to x86-64-v2 CPU requirement?

Scimmia wrote:

No, the plan is v3 alongside base x86-64

Cool!

Offline

#4 2022-12-03 11:04:28

enihcam
Member
From: Internet
Registered: 2009-12-20
Posts: 220

Re: [closed] Will Arch transition to x86-64-v2 CPU requirement?

Is there a timeline of this plan already?

Scimmia wrote:

No, the plan is v3 alongside base x86-64

Offline

#5 2022-12-03 14:42:56

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [closed] Will Arch transition to x86-64-v2 CPU requirement?

When it's ready.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#6 2022-12-26 07:51:19

HLFH
Member
Registered: 2012-07-16
Posts: 6

Re: [closed] Will Arch transition to x86-64-v2 CPU requirement?

Sad. My CPU is x86-64-v2, I would have loved a transition to x86-64-v2 CPU requirement.

Offline

#7 2022-12-27 01:08:06

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,148

Re: [closed] Will Arch transition to x86-64-v2 CPU requirement?

HLFH wrote:

Sad. My CPU is x86-64-v2, I would have loved a transition to x86-64-v2 CPU requirement.

Rendering everyone else's hardware incompatible? Or did you mean 'support' rather than 'requirement'?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#8 2023-01-05 19:04:50

codemac
Member
From: Cliche Tech Place
Registered: 2005-05-13
Posts: 794
Website

Re: [closed] Will Arch transition to x86-64-v2 CPU requirement?

You can always recompile your packages that you care about using ABS. This is what I've been doing for various packages (kernel, emacs) for many years.

The vast vast majority of software will not see any significant improvement going from x86_64 -> "-v2" or "-v3". Especially big packages that try to dynamically detect CPU types in their binaries anyways.

Pick a few programs you care enough to recompile, and use march / mtune = native. I only upgrade my kernel (and various kernel related packages) if I hit a bug, or if it's been more than 6 months. Then I use package group along with PkgIgnore to make sure new updates don't overwrite them. The kernel is a bit annoying due to how many other packages this means you're tracking, but something like emacs is relatively straight forward.

Offline

#9 2023-01-05 19:44:33

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: [closed] Will Arch transition to x86-64-v2 CPU requirement?

@codemac - for the kernel, you need to modify the kernel code as it does not honor your *FLAGS.  See: https://github.com/graysky2/kernel_compiler_patch

Last edited by graysky (2023-01-05 19:49:12)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#10 2023-01-05 21:49:35

codemac
Member
From: Cliche Tech Place
Registered: 2005-05-13
Posts: 794
Website

Re: [closed] Will Arch transition to x86-64-v2 CPU requirement?

KCFLAGS, KCPPFLAGS, etc are always appended at the end of your flags, so they take precedence: https://github.com/torvalds/linux/blob/ … file#L1112

I just set those in my build() PKGBUILD.

The patch you refer to seems to be about adding them as options to `make config` which certainly no one needs to be doing if they're building a package for themselves. Let me know if I misunderstand your patch.

Offline

#11 2023-01-05 21:59:57

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: [closed] Will Arch transition to x86-64-v2 CPU requirement?

The kernel doesn't work that way in my experience.  Test it yourself:

% grep march /etc/makepkg.conf
CFLAGS="-march=znver3 -O2 -pipe -fno-plt -fexceptions \

% cd /path/to/linux
% makepkg -s
...
% ps aux | grep march
facade      54933  0.0  0.0  63308 30260 pts/1    R+   16:57   0:00 /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/cc1 -quiet -nostdinc -I ./arch/x86/include -I 
./arch/x86/include/generated -I ./include -I ./arch/x86/include/uapi -I ./arch/x86/include/generated/uapi -I ./include/uapi -I ./include/generated/uapi -D __KERNEL__ -D 
CC_USING_FENTRY -D KBUILD_MODFILE="arch/x86/events/intel/ds" -D KBUILD_BASENAME="ds" -D KBUILD_MODNAME="ds" -D __KBUILD_MODNAME=kmod_ds -include 
./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -MMD arch/x86/events/intel/.ds.o.d arch/x86/events/intel/ds.c -quiet -
dumpdir arch/x86/events/intel/ -dumpbase ds.c -dumpbase-ext .c -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -mno-80387 -mno-fp-ret-in-387 -mpreferred-
stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -mindirect-branch=thunk-extern -mindirect-branch-register -mindirect-branch-cs-prefix -
mfunction-return=thunk-extern -mharden-sls=all -mrecord-mcount -mfentry -march=x86-64 -g -gdwarf-5 -O2 -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -
Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -Wno-sign-compare -Wno-frame-address -Wformat-truncation=0 -Wformat-
overflow=0 -Wno-address-of-packed-member -Wframe-larger-than=2048 -Wno-main -Wno-unused-but-set-variable -Wunused-const-variable=0 -Wdangling-pointer=0 -
Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wstringop-overflow=0 -Wno-restrict -Wno-maybe-uninitialized -Wno-array-
bounds -Walloc-size-larger-than=18446744073709551615EiB -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-
packed-not-aligned -std=gnu11 -p -fmacro-prefix-map=./= -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -fcf-protection=branch -falign-jumps=1 -falign-loops=1 -fno-
asynchronous-unwind-tables -fno-jump-tables -fno-delete-null-pointer-checks -fno-allow-store-data-races -fstack-protector-strong -ftrivial-auto-var-init=zero -fno-stack-clash-
protection -fno-strict-overflow -fstack-check=no -fconserve-stack -o /tmp/ccPHl4wl.s

The -march=znver3 is not honored.

You can add a literal 'echo $CFLAGS' to your PKGBUILD to see that makepkg is using them:

% makepkg -s
...
  -> Prepared linux-minimum version 6.1.3-1-minimum
-march=znver3 -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection

Last edited by graysky (2023-01-05 22:02:21)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#12 2023-01-05 22:02:51

codemac
Member
From: Cliche Tech Place
Registered: 2005-05-13
Posts: 794
Website

Re: [closed] Will Arch transition to x86-64-v2 CPU requirement?

Right, which is why I set different flags (KCFLAGS) in a different file (PKGBUILD). I think we're saying roughly the same thing.

Offline

#13 2023-01-05 22:10:34

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: [closed] Will Arch transition to x86-64-v2 CPU requirement?

Can you show the lines you added to your PKGBUILD's build function?  Are you suggesting:

  export KCFLAGS=' -march=znver3'
  export KCPPFLAGS=' -march=znver3'
  make LLVM=$_LLVM LLVM_IAS=$_LLVM all

Last edited by graysky (2023-01-05 22:14:20)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#14 2023-01-06 00:52:54

codemac
Member
From: Cliche Tech Place
Registered: 2005-05-13
Posts: 794
Website

Re: [closed] Will Arch transition to x86-64-v2 CPU requirement?

Just go to your kernel package's source directory.

Run "make -n KCFLAGS=myflags all" in your src/ directory. This runs make in dry run mode and prints the commands it was going to run.

See that your flags are included and rejoice.

Some of the command lines are long long long, and run for very short periods of time, which means ps aux may truncate them and miss them.

What I do is put "make KCFLAGS="-march=native -mtune=native" htmldocs all" in my PKGBUILD

Offline

#15 2023-01-06 09:52:01

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: [closed] Will Arch transition to x86-64-v2 CPU requirement?

The patch I maintain works for folks who want to select it in the nconfig or menuconfig but your way is more simplistic, I like it.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#16 2023-01-25 17:24:22

enihcam
Member
From: Internet
Registered: 2009-12-20
Posts: 220

Re: [closed] Will Arch transition to x86-64-v2 CPU requirement?

codemac wrote:

You can always recompile your packages that you care about using ABS. This is what I've been doing for various packages (kernel, emacs) for many years.

The vast vast majority of software will not see any significant improvement going from x86_64 -> "-v2" or "-v3". Especially big packages that try to dynamically detect CPU types in their binaries anyways.

Pick a few programs you care enough to recompile, and use march / mtune = native. I only upgrade my kernel (and various kernel related packages) if I hit a bug, or if it's been more than 6 months. Then I use package group along with PkgIgnore to make sure new updates don't overwrite them. The kernel is a bit annoying due to how many other packages this means you're tracking, but something like emacs is relatively straight forward.

An arch-based distro, CachyOS claims that all its packages "are compiled with LTO and x86-64-v3 optimization, security flags and performance improvements".

The following commands do everything for you.

wget https://build.cachyos.org/cachyos-repo.tar.xz
tar xvf cachyos-repo.tar.xz
cd cachyos-repo
sudo ./cachyos-repo.sh

Offline

#17 2023-01-25 19:09:35

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [closed] Will Arch transition to x86-64-v2 CPU requirement?

Why are you posting on the arch forums with advice on how to run a script to conver their system to another distro?  And more importantly, why would one use that script to enable a repo which is trivial to do?  And yet more importantly, why would one trust software built by a third party when that ridiculous script is the only bit of information available to assess their competence?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#18 2023-01-25 19:23:06

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,300
Website

Re: [closed] Will Arch transition to x86-64-v2 CPU requirement?

The script runs a partial upgrade at the end. Oh dear.


Para todos todo, para nosotros nada

Offline

#19 2023-01-26 12:44:44

enihcam
Member
From: Internet
Registered: 2009-12-20
Posts: 220

Re: [closed] Will Arch transition to x86-64-v2 CPU requirement?

Trilby wrote:

Why are you posting on the arch forums with advice on how to run a script to conver their system to another distro?  And more importantly, why would one use that script to enable a repo which is trivial to do?  And yet more importantly, why would one trust software built by a third party when that ridiculous script is the only bit of information available to assess their competence?

because I assume you can read the script before run?

Offline

#20 2023-01-26 12:56:37

d.ALT
Member
Registered: 2019-05-10
Posts: 943

Re: [closed] Will Arch transition to x86-64-v2 CPU requirement?

enihcam wrote:
Trilby wrote:

Why are you posting on the arch forums with advice on how to run a script to conver their system to another distro?  And more importantly, why would one use that script to enable a repo which is trivial to do?  And yet more importantly, why would one trust software built by a third party when that ridiculous script is the only bit of information available to assess their competence?

because I assume you can read the script before run?

I think Tribly wants you to be aware of this:

Trilby wrote:

trust software built by a third party when that ridiculous script is the only bit of information available to assess their competence?


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#21 2023-01-26 13:49:08

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [closed] Will Arch transition to x86-64-v2 CPU requirement?

Yes, I didn't think I veiled my disdain for that script at all.  I'm rarely guilty of couching criticisms in too much subtlety.  I'll see if I can rectify that in this case:

That script is ridiculously long and complex aiming to do a trivial task that any archer could do on their own in a small fraction of the time it would take them to read that whole script.  I didn't even get to the partial upgrade issue in the script in my reading, I stopped after countless foolish uses of grep / awk / function-encapsulation-for-no-reason-other-than-obscurity / etc.  So indeed I can read the script, but will not, as it's shit.  Some other less cynical archer, however, might stumble upon your post and follow it blindly and suffer negative consequences of doing so.

However, d.ALT is right on the more important point, that even if that script was not harmful but just very poorly written, it would raise suspicion about the quality of the actual packages in that other distros repos.

In any case claiming that archers should be capable of recognizing that your advice is harmful is no excuse for posting it.  Posting links to harmful scripts and instructions for users to run said scripts as root should get one blatantly chastized and publicly ridiculed if not banned.

Further suggesting that users here switch to some other distro for no apparent reason (are you connected w/ that distro somehow) which will result in their systems no longer being supported here is yet again a disservice to them.

Last edited by Trilby (2023-01-26 13:55:35)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#22 2023-01-26 13:52:11

Awebb
Member
Registered: 2010-05-06
Posts: 6,611

Re: [closed] Will Arch transition to x86-64-v2 CPU requirement?

run() {
    if $_install; then
        run_install
    elif $_remove; then
        run_remove
    fi

    yes | pacman -Sy
}

run

Oh my.

Offline

#23 2023-01-26 14:42:47

seth
Member
Registered: 2012-09-03
Posts: 58,840

Re: [closed] Will Arch transition to x86-64-v2 CPU requirement?

The natural consequence of decades of teaching programming at the example of java… roll

Offline

#24 2023-01-26 18:17:49

enihcam
Member
From: Internet
Registered: 2009-12-20
Posts: 220

Re: [closed] Will Arch transition to x86-64-v2 CPU requirement?

Trilby wrote:

Yes, I didn't think I veiled my disdain for that script at all.  I'm rarely guilty of couching criticisms in too much subtlety.  I'll see if I can rectify that in this case:

That script is ridiculously long and complex aiming to do a trivial task that any archer could do on their own in a small fraction of the time it would take them to read that whole script.  I didn't even get to the partial upgrade issue in the script in my reading, I stopped after countless foolish uses of grep / awk / function-encapsulation-for-no-reason-other-than-obscurity / etc.  So indeed I can read the script, but will not, as it's shit.  Some other less cynical archer, however, might stumble upon your post and follow it blindly and suffer negative consequences of doing so.

However, d.ALT is right on the more important point, that even if that script was not harmful but just very poorly written, it would raise suspicion about the quality of the actual packages in that other distros repos.

In any case claiming that archers should be capable of recognizing that your advice is harmful is no excuse for posting it.  Posting links to harmful scripts and instructions for users to run said scripts as root should get one blatantly chastized and publicly ridiculed if not banned.

Further suggesting that users here switch to some other distro for no apparent reason (are you connected w/ that distro somehow) which will result in their systems no longer being supported here is yet again a disservice to them.

I've been using Arch for production for more than a decade. I have my own disciplines of maintenance of my arch boxes. I use etckeeper + version control of various configurations; I use as fewer AUR packages as possible; I use certificates instead of passwords; I limit privileges of all systemd services; I read doc + code if something goes wrong; I figure out everything about it before I fix it; if I can't patch the fix, I file bugs (to kernel, systemd, etc.); I even use UPS for power backup. Back to the story, i've already stated that CachyOS is "an Arch-based distro". As an Archer, he/she should understand that if he/she had to reach to the goal of completion of 'x86-64-v3' transition, this would be the the only way. What can the most 'negative consequence' be for those blindly followers? Just re-install, I guess, because they play Arch just for testing, curiosity, or fun. They don't care about their systems. They don't want to learn and grow up with Arch. They don't know about declarative, consistency, simplicity. They don't even understand what Arch really is about. Just go back to Ubuntu, Mint, Mac or Windows...I even don't think it's worthy to spend a single second in this conversation. I'd prefer discussing how to help Arch in its v3 transition, however please read the previous replies I got, none of them are not helpful.

Offline

#25 2023-01-26 21:52:02

CarbonChauvinist
Member
Registered: 2012-06-16
Posts: 413
Website

Re: [closed] Will Arch transition to x86-64-v2 CPU requirement?

I've been using the ALHP unofficial user repo to get v3 builds and has worked pretty well so far.

It's described as a

Go based buildbot to build official Archlinux repos with x86-64 feature levels, -O3 and LTO

It currently only builds for v3 and v2 and here's their current package status page to see which packages are currently being built (by default excludes all "any" architecture packages).

This is not an endorsement, you're responsible for your own vetting... but, just letting others know this is a potential option if they're interested in further exploring.


"the wind-blown way, wanna win? don't play"

Offline

Board footer

Powered by FluxBB