Top
Best
New

Posted by todsacerdoti 17 hours ago

RISC-V Is Sloooow(marcin.juszkiewicz.com.pl)
259 points | 261 commentspage 2
leni536 16 hours ago|
Is cross compilation out of the question?
STKFLT 15 hours ago||
I'd guess that the issue is running the `%install` and `%check` stages of the .spec file. The Python library rpy (to pull a random example from Marcin's PRs) runs rpy's pytest test suite and had to be modified to avoid running vector tests on RISC-V.

Obviously a solvable problem to split build and test but perhaps the time savings aren't worth the complexity.

https://src.fedoraproject.org/rpms/rpy/pull-request/4#reques...

leni536 15 hours ago||
Maybe the tests could be run with user-mode qemu instead of the whole thing running under qemu or on RISC-V hardware. Could possibly be more or less seamless with binfmt_misc being set up in the builders.
kashyapc 12 hours ago|||
Near as I know, Fedora prefers native compilation for the builds.

Your question made me look up Arm's history in Fedora and came up on this 2012 LWN thread[1]. There's some discussion against cross-compilation already back then.

[1] https://lwn.net/Articles/487622/

IshKebab 16 hours ago||
It's usually an enormous pain to set up. QEMU is probably the best option.
VorpalWay 5 hours ago|||
Yocto, which we use at work, manages it just fine to build a whole embedded Linux distro. So I don't see why Fedora couldn't make it work if they wanted. You could even scp over the test suites to run that on native systems if you wanted.
mort96 5 hours ago||
Yocto manages it thanks to the tireless effort of a community of people maintaining patches and unholy hacks for a ton of software to make it cross compilable. And they have nowhere near the amount of recipes that Fedora has.
VorpalWay 1 hour ago||
This is true, but the hacks are mostly in the C and C++ recipes as I understand it. Something like Rust or especially Go or Zig is far easier to cross compile.

I personally found cross compiling Rust easy, as long as you don't have C dependencies. If you have C dependencies it becomes way harder.

This suggests that spending time to upstream cross compilation fixes would be worth it for everyone, and probably even in the C world, 20% of the packages need 80% of the effort.

pantalaimon 15 hours ago||||
T2 manages to do it

https://t2linux.com/

STKFLT 15 hours ago||||
Maybe there are issues I'm not aware of but using dockcross has made cross-compilation quite easy in my experience.

https://github.com/dockcross/dockcross

mort96 5 hours ago||
How does it handle .so version differences and glibc version differences between the container and the target system?
sofixa 16 hours ago|||
Depends on the language, it's pretty trivial with Go.
Zambyte 15 hours ago|||
Unless you use CGO. I've heard people using Zig (which has great cross compilation for the Zig language as well) to cross compile C with CGO though.
IshKebab 15 hours ago|||
Yes, but they're compiling binutils.
utopiah 4 hours ago||
FWIW checkout dockcross/linux-riscv32 and dockcross/linux-riscv64 if compilation itself is your problem.

I setup a CopyParty server on a headless RISC-V SBC and was a breeze. Just get the packets, do the thing, move on. Obviously depends on your need but maybe you're not using the right workflow and blame the tools instead.

mrbluecoat 12 hours ago||
> Random mumblings of ARM developer ... RISC-V is sloooow

Old news. See also:

> Random mumblings of x86_64 developer ... ARM is sloooow

throwa356262 2 hours ago|
What kind or ancient arm hardware are they using here?

On a related note, SoC companies needs to get their act together and start using the latest arm cores. Even the mid range cores of 1-2 years ago show a huge leap in performance:

https://sbc.compare/56-raspberry-pi-500-plus-16gb/101-radxa-...

orangeboats 2 hours ago||
>What kind or ancient arm hardware are they using here?

I think that's the point being made here. ARM in the 2000s was not known to be fast, now it is.

RISC-V being slow isn't an inherent characteristic of the ISA, it only tells you about the quality of its implementations. And said implementations will only improve if corporations are throwing capitals at it (see: Apple, Qualcomm, etc.)

saghm 12 hours ago||
If I'm reading their chart right, they have barely half as much memory for their RISC-V machine compared to any of the others? I don't know enough to know whether it's actually bottlenecked by memory, but it's a bit odd to claim it's slower, give those numbers, and not say anything about it. I'd hope they ruled that out as the source of the discrepancy, but it's hard to tell without confirmation.
Levitating 3 hours ago|
I think it's mentioned clearly in the article.

> RISC-V builders have four or eight cores with 8, 16 or 32 GB of RAM (depending on a board)

> The UltraRISC UR-DP1000 SoC, present on the Milk-V Titan motherboard should improve situation a bit (and can have 64 GB ram).

RISC-V SOCs just typically don't support much ram. With the exception of the SG2042 which can take 128GB, but it's expensive, buggy and now old.

So I am sure it's a combination of low ram and low clockspeeds.

mkj 12 hours ago||
Does that page even say which RISC-V CPUs are being used that are slow? I couldn't see it, which seems a bit of pointless complaining.
Levitating 3 hours ago|
> RISC-V builders have four or eight cores with 8, 16 or 32 GB of RAM (depending on a board).

Which boards are used specifically should not matter much. There's not much available.

Except for the Milk-V Pioneer, which has 64 cores and 128GB ram. But that's an older architecture and it's expensive.

sylware 3 hours ago||
The current hardware used is self-hosting mini-server grade, and certainly not on the latest silicon process. "Slow" is expected.

It is not the ISA, but the implementations and those horrible SDKs which needs to be adjusted for RISC-V (actually any new ISA).

RISC-V needs extremely performant implementations, that on the best silicon process, until then RISC-V _will be_ "slow".

Not to mention, RISC-V is 'standard ISA': assembly writted software is more than appropriate in many cases.

srott 15 hours ago||
Couldn’t be caused by a slower compiler? Fe. What would be a difference when cross compiling same code to aarch64 vs risc-v?
aa-jv 3 hours ago||
I don't care as long as it keeps my soldering iron hot.
rbalint 16 hours ago||
If the builds are slow, build accelerators can help a lot. Ccache would work for sure and there is also firebuild, that can accelerate the linker phase and many other tools in builds.
yogthos 15 hours ago|
there are projects for making high performance RISC-V chips like this one https://github.com/OpenXiangShan/XiangShan
classichasclass 14 hours ago|
OK, I'll bite. If this is a truly competitive core - I don't claim enough personal expertise to judge - does anyone fab and sell it? There should be a business case if it is.
luyu_wu 13 hours ago||
If I remember correctly,it was taped out by some company as some embedded core in a GPU?

I guess that may be the true use case for 'Open-Source' cores.

That being said, the advertised SPEC2007 scores are close to a M1 in IPC.

More comments...