Re: [PATCH spice-streaming-agent v5 2/2] Implement handling of error messages from the server

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

 



> > On 7 Mar 2018, at 16:14, Frediano Ziglio <fziglio@xxxxxxxxxx> wrote:
> > 
> >> 
> >> On Wed, Mar 07, 2018 at 03:01:43PM +0100, Christophe de Dinechin wrote:
> >>> Also, on an arch like ARM. the packed attribute gives the compiler the
> >>> opportunity to use special mis-aligned load and store instructions. So
> >>> it’s a good thing, isn’t it?
> >> 
> >> Iirc the compiler was not doing that much magic last time the issue came
> >> up.
> >> 
> >> Christophe
> >> 
> > 
> > Don't exactly agree.
> > Was quite confusing. There were 2 patches, one to fix ARMv7 and alignment
> > of
> > 64 bit and one to fix old ARMv5.
> > We didn't have much test environment and the reply for testing was very
> > few so we didn't have much confirmations.
> > When I tried directly using a ARM machine the code and speed improved a
> > lot.
> 
> Very interesting. Last time the issue of alignment came up, I did some tests
> for misaligned accesses on various generations of x86 and ARM. On x86, I
> could see no performance impact at all for any Core-i5 and i7 machine, and
> barely noticeable for earlier ones. For ARM, the performance impact was more
> serious, but much less than I anticipated. I can try to re-do the experiment
> if anybody is interested.
> 
> My conclusion at the time, which was a surprise to me, was that alignment no
> longer mattered at all on x86.
> 
> > Is confusing actually that the unaligned access code is generated only for
> > structures.
> > 

On ARMv7 a misaligned access to a 64 bit causes a trap to the kernel
and an emulation, you can understand is quite slow.
On other machines (SPARC) there are specific instructions for misaligned access
so if you don't have packed and misalignment you either get a signal or
an emulation.
On old machines (ARMv5) you have to read byte-by-byte (or emulation).
In x86 is hard to notice the difference, unless you use lock/atomic (as you
have an exception). You can notice the difference on random access
or large containers. For instance QXLRam is defined packed but contains
integers used with atomic operation. Luckily they are aligned!

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]