[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: General beginners questions for debian sparc64



> At an X.org conference in Montreal last year I chatted with someone who
> was fixing these sorts of problems for IBM. We might get better progress
> by looking at the recent fixes in the PPC and ZOS trees (sorry, I have
> that name incorrect). These architectures are big endian so the fixes
> might be easily ported to SPARC.
> 
> There might still be problems due to bus word alignment, but from memory
> SPARC is more 'flexible' than the others on that issue.

Actually... My recent experience on that front is the opposite: Memory
misalignment is a much more rampant problem on sparc than endianness
issues, and the platform is actually *less* flexible than, for example, x86.

As a matter of fact, on x86, the compiler can often automatically
generate alignment-safe instructions when it is unsure about alignment.
And on most recent x86 CPU generations, these alignment-safe
instructions don't even incur a performance penalty. On sparc and other
more RISC-like architectures, there are less or no such "fallbacks",
requiring expensive workarounds.

Here is a beautiful overview of what can go wrong (even on x86):
https://pzemtsov.github.io/2016/11/06/bug-story-alignment-on-x86.html

On the other hand, compilers have become very "smart" about optimising
away seemingly expensive constructs (such as memcopy) when they are sure
there is no alignment issue. As an example, see this patch I wrote for
the gcr library: https://gitlab.gnome.org/GNOME/gcr/-/issues/34

> I am still hoping to get my SparcBlade 2000 working again! Though with
> no time available.

Good luck!
It would definitely help the sparc64 Debian port a great deal if more
people play with these machines.


Reply to: