Re: [Spice-devel] [PATCH spice-protocol] stats: Avoid holes in SpiceStat structure

2019-01-03 Thread Frediano Ziglio
> On Thu, Jan 03, 2019 at 10:15:43AM -0500, Frediano Ziglio wrote: > > > > > > On Thu, Jan 03, 2019 at 02:14:24PM +, Frediano Ziglio wrote: > > > > The SpiceStat structure can be 20 or 24 bytes depending on alignment. > > > > Being a memory mapped structure potentially used with lockless acces

Re: [Spice-devel] [PATCH spice-protocol] stats: Avoid holes in SpiceStat structure

2019-01-03 Thread Christophe Fergeau
On Thu, Jan 03, 2019 at 10:15:43AM -0500, Frediano Ziglio wrote: > > > > On Thu, Jan 03, 2019 at 02:14:24PM +, Frediano Ziglio wrote: > > > The SpiceStat structure can be 20 or 24 bytes depending on alignment. > > > Being a memory mapped structure potentially used with lockless access > > > is

Re: [Spice-devel] [PATCH spice-protocol] stats: Avoid holes in SpiceStat structure

2019-01-03 Thread Christophe Fergeau
On Thu, Jan 03, 2019 at 10:15:43AM -0500, Frediano Ziglio wrote: > > > > On Thu, Jan 03, 2019 at 02:14:24PM +, Frediano Ziglio wrote: > > > The SpiceStat structure can be 20 or 24 bytes depending on alignment. > > > Being a memory mapped structure potentially used with lockless access > > > is

Re: [Spice-devel] [PATCH spice-protocol] stats: Avoid holes in SpiceStat structure

2019-01-03 Thread Frediano Ziglio
> > On Thu, Jan 03, 2019 at 02:14:24PM +, Frediano Ziglio wrote: > > The SpiceStat structure can be 20 or 24 bytes depending on alignment. > > Being a memory mapped structure potentially used with lockless access > > is not good to have it unaligned. > > The current tool that reads this memory

Re: [Spice-devel] [PATCH spice-protocol] stats: Avoid holes in SpiceStat structure

2019-01-03 Thread Christophe Fergeau
On Thu, Jan 03, 2019 at 02:14:24PM +, Frediano Ziglio wrote: > The SpiceStat structure can be 20 or 24 bytes depending on alignment. > Being a memory mapped structure potentially used with lockless access > is not good to have it unaligned. > The current tool that reads this memory mapped file

[Spice-devel] [PATCH spice-protocol] stats: Avoid holes in SpiceStat structure

2019-01-03 Thread Frediano Ziglio
The SpiceStat structure can be 20 or 24 bytes depending on alignment. Being a memory mapped structure potentially used with lockless access is not good to have it unaligned. The current tool that reads this memory mapped file (reds_stats) is able to detect if the structure is either 20 or 24 bytes