Re: [Spice-devel] [spice PATCH v1 0/3] memory pool limit on char-device

2015-11-12 Thread Victor Toso
Hi, On Thu, Nov 12, 2015 at 05:00:16PM +0100, Victor Toso wrote: > Hi, > > Rebased with latest master. Ping? > http://lists.freedesktop.org/archives/spice-devel/2015-September/021855.html > > Victor Toso (3): > char-device: fix usage of free/unref on WriteBuffer > char-device: Define a memory

Re: [Spice-devel] [PATCH 7/7] worker: painfully move display_channel_add_drawable

2015-11-12 Thread Jonathon Jongsma
I plan to split this one up a little bit. On Thu, 2015-11-12 at 14:01 +, Frediano Ziglio wrote: > From: Marc-André Lureau > > --- > server/display-channel.c | 541 > server/display-channel.h | 53 ++- > server/red_worker.c | 1054 ++-

Re: [Spice-devel] [PATCH 3/7] worker: move surfaces to DisplayChannel

2015-11-12 Thread Jonathon Jongsma
On Thu, 2015-11-12 at 13:59 -0500, Frediano Ziglio wrote: > > > > On Thu, 2015-11-12 at 11:16 -0500, Frediano Ziglio wrote: > > > > > > > > On Thu, Nov 12, 2015 at 3:00 PM, Frediano Ziglio > > > > wrote: > > > > > From: Marc-André Lureau > > > > > > > > > > Ok. this one was painful.Note that i

Re: [Spice-devel] [spice PATCH v1 1/3] char-device: fix usage of free/unref on WriteBuffer

2015-11-12 Thread Fabiano Fidêncio
On Thu, Nov 12, 2015 at 5:20 PM, Victor Toso wrote: > Hi, > > On Thu, Nov 12, 2015 at 05:12:26PM +0100, Fabiano Fidêncio wrote: >> On Thu, Nov 12, 2015 at 5:00 PM, Victor Toso wrote: >> > There are places were the could should definetly free the >> > SpiceCharDeviceWriteBuffer and places that it

Re: [Spice-devel] [PATCH 3/7] worker: move surfaces to DisplayChannel

2015-11-12 Thread Frediano Ziglio
> > On Thu, 2015-11-12 at 11:16 -0500, Frediano Ziglio wrote: > > > > > > On Thu, Nov 12, 2015 at 3:00 PM, Frediano Ziglio > > > wrote: > > > > From: Marc-André Lureau > > > > > > > > Ok. this one was painful.Note that in some cases, DCC_TO_DC should be > > > > made safer (there used to be a i

Re: [Spice-devel] [PATCH 5/7] worker: move compression parameters to dcc

2015-11-12 Thread Pavel Grunt
Hi Jonathon, On Thu, 2015-11-12 at 11:41 -0600, Jonathon Jongsma wrote: > On Thu, 2015-11-12 at 16:24 +0100, Pavel Grunt wrote: > > On Thu, 2015-11-12 at 15:40 +0100, Fabiano Fidêncio wrote: > > > On Thu, Nov 12, 2015 at 3:00 PM, Frediano Ziglio > > > wrote: > > > > From: Marc-André Lureau > > >

Re: [Spice-devel] [PATCH 3/7] worker: move surfaces to DisplayChannel

2015-11-12 Thread Jonathon Jongsma
On Thu, 2015-11-12 at 11:16 -0500, Frediano Ziglio wrote: > > > > On Thu, Nov 12, 2015 at 3:00 PM, Frediano Ziglio wrote: > > > From: Marc-André Lureau > > > > > > Ok. this one was painful.Note that in some cases, DCC_TO_DC should be > > > made safer (there used to be a if !dcc guard in some pl

Re: [Spice-devel] [PATCH 5/7] worker: move compression parameters to dcc

2015-11-12 Thread Jonathon Jongsma
On Thu, 2015-11-12 at 16:24 +0100, Pavel Grunt wrote: > On Thu, 2015-11-12 at 15:40 +0100, Fabiano Fidêncio wrote: > > On Thu, Nov 12, 2015 at 3:00 PM, Frediano Ziglio wrote: > > > From: Marc-André Lureau > > > > > > --- > > > server/display-channel.c | 9 - > > > server/display-channe

Re: [Spice-devel] aspeed: video frames pass-through

2015-11-12 Thread Anton D . Kachalov
Hello. 03.11.2015, 19:17, "Anton D. Kachalov" : > 03.11.2015, 18:43, "Christophe Fergeau" : >>  Hmm, not very familiar with ARM, and not sure this has seen a lot of >>  testing. Maybe getting a backtrace would shed more light? > > I'll try rewritten version with original proto spec (packed int8/in

Re: [Spice-devel] [spice PATCH v1 1/3] char-device: fix usage of free/unref on WriteBuffer

2015-11-12 Thread Victor Toso
Hi, On Thu, Nov 12, 2015 at 05:00:17PM +0100, Victor Toso wrote: > There are places were the could should definetly free the > SpiceCharDeviceWriteBuffer and places that it should only unref it. The > current use of spice_char_device_write_buffer_free was missleading. > > This patch creates the sp

Re: [Spice-devel] [spice PATCH v1 3/3] char-device: free all memory pool when no clients

2015-11-12 Thread Victor Toso
Hi, On Thu, Nov 12, 2015 at 05:14:04PM +0100, Fabiano Fidêncio wrote: > On Thu, Nov 12, 2015 at 5:00 PM, Victor Toso wrote: > > When no client is connect we should not need to keep the memory pool > > used by char-device. On most situations this is not significante but fixed typo: "significante"

Re: [Spice-devel] [PATCH 2/7] worker: Move stream functions to stream.c

2015-11-12 Thread Frediano Ziglio
> > On Thu, Nov 12, 2015 at 3:00 PM, Frediano Ziglio wrote: > > From: Jonathon Jongsma > > > > --- > > server/display-channel.h | 17 +++- > > server/red_worker.c | 105 > > --- > > server/stream.c | 70 +++

Re: [Spice-devel] [spice PATCH v1 1/3] char-device: fix usage of free/unref on WriteBuffer

2015-11-12 Thread Victor Toso
Hi, On Thu, Nov 12, 2015 at 05:12:26PM +0100, Fabiano Fidêncio wrote: > On Thu, Nov 12, 2015 at 5:00 PM, Victor Toso wrote: > > There are places were the could should definetly free the > > SpiceCharDeviceWriteBuffer and places that it should only unref it. The > > current use of spice_char_devic

Re: [Spice-devel] [PATCH 3/7] worker: move surfaces to DisplayChannel

2015-11-12 Thread Frediano Ziglio
> > On Thu, Nov 12, 2015 at 3:00 PM, Frediano Ziglio wrote: > > From: Marc-André Lureau > > > > Ok. this one was painful.Note that in some cases, DCC_TO_DC should be > > made safer (there used to be a if !dcc guard in some places, although > > that looks wrong anyway)... > > --- > > server/disp

Re: [Spice-devel] [spice PATCH v1 2/3] char-device: Define a memory pool limit

2015-11-12 Thread Fabiano Fidêncio
On Thu, Nov 12, 2015 at 5:00 PM, Victor Toso wrote: > Otherwise the amount of unused memory could grow while transfering big > chunks of data. This change only means that once the memory was used it > will not be stored again after the limit was reached. > > Related: https://bugs.freedesktop.org/s

Re: [Spice-devel] [spice PATCH v1 3/3] char-device: free all memory pool when no clients

2015-11-12 Thread Fabiano Fidêncio
On Thu, Nov 12, 2015 at 5:00 PM, Victor Toso wrote: > When no client is connect we should not need to keep the memory pool > used by char-device. On most situations this is not significante but > when using webdav this could mean freeing MAX_POOL_SIZE bytes > > Related: https://bugs.freedesktop.or

Re: [Spice-devel] [spice PATCH v1 1/3] char-device: fix usage of free/unref on WriteBuffer

2015-11-12 Thread Fabiano Fidêncio
On Thu, Nov 12, 2015 at 5:00 PM, Victor Toso wrote: > There are places were the could should definetly free the > SpiceCharDeviceWriteBuffer and places that it should only unref it. The > current use of spice_char_device_write_buffer_free was missleading. > > This patch creates the spice_char_devi

[Spice-devel] [spice PATCH v1 0/3] memory pool limit on char-device

2015-11-12 Thread Victor Toso
Hi, Rebased with latest master. Ping? http://lists.freedesktop.org/archives/spice-devel/2015-September/021855.html Victor Toso (3): char-device: fix usage of free/unref on WriteBuffer char-device: Define a memory pool limit char-device: free all memory pool when no clients server/char_dev

[Spice-devel] [spice PATCH v1 3/3] char-device: free all memory pool when no clients

2015-11-12 Thread Victor Toso
When no client is connect we should not need to keep the memory pool used by char-device. On most situations this is not significante but when using webdav this could mean freeing MAX_POOL_SIZE bytes Related: https://bugs.freedesktop.org/show_bug.cgi?id=91350 --- server/char_device.c | 6 ++

[Spice-devel] [spice PATCH v1 1/3] char-device: fix usage of free/unref on WriteBuffer

2015-11-12 Thread Victor Toso
There are places were the could should definetly free the SpiceCharDeviceWriteBuffer and places that it should only unref it. The current use of spice_char_device_write_buffer_free was missleading. This patch creates the spice_char_device_write_buffer_unref and properly call these two functions.

[Spice-devel] [spice PATCH v1 2/3] char-device: Define a memory pool limit

2015-11-12 Thread Victor Toso
Otherwise the amount of unused memory could grow while transfering big chunks of data. This change only means that once the memory was used it will not be stored again after the limit was reached. Related: https://bugs.freedesktop.org/show_bug.cgi?id=91350 --- server/char_device.c | 9 -

Re: [Spice-devel] [PATCH 6/7] worker: don't use weird RedCompressedBuf nbytes shifting

2015-11-12 Thread Frediano Ziglio
> > On Thu, Nov 12, 2015 at 3:01 PM, Frediano Ziglio wrote: > > From: Marc-André Lureau > > > > --- > > server/display-channel.h | 3 +-- > > server/red_worker.c | 20 ++-- > > 2 files changed, 11 insertions(+), 12 deletions(-) > > > > diff --git a/server/display-channel.h

Re: [Spice-devel] [PATCH 1/7] worker: remove current_add assert

2015-11-12 Thread Fabiano Fidêncio
On Thu, Nov 12, 2015 at 4:36 PM, Frediano Ziglio wrote: > >> On Thu, Nov 12, 2015 at 3:00 PM, Frediano Ziglio wrote: >> > From: Marc-André Lureau >> > >> > --- >> > server/red_worker.c | 2 +- >> > 1 file changed, 1 insertion(+), 1 deletion(-) >> > >> > diff --git a/server/red_worker.c b/server

Re: [Spice-devel] [PATCH 1/7] worker: remove current_add assert

2015-11-12 Thread Frediano Ziglio
> On Thu, Nov 12, 2015 at 3:00 PM, Frediano Ziglio wrote: > > From: Marc-André Lureau > > > > --- > > server/red_worker.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/server/red_worker.c b/server/red_worker.c > > index 6bc015f..d33a352 100644 > > --- a/server/

Re: [Spice-devel] [PATCH 5/7] worker: move compression parameters to dcc

2015-11-12 Thread Pavel Grunt
On Thu, 2015-11-12 at 15:40 +0100, Fabiano Fidêncio wrote: > On Thu, Nov 12, 2015 at 3:00 PM, Frediano Ziglio wrote: > > From: Marc-André Lureau > > > > --- > >  server/display-channel.c |  9 - > >  server/display-channel.h |  8 +++- > >  server/red_worker.c  | 31 +++

Re: [Spice-devel] [PATCH 5/7] worker: move compression parameters to dcc

2015-11-12 Thread Fabiano Fidêncio
On Thu, Nov 12, 2015 at 3:00 PM, Frediano Ziglio wrote: > From: Marc-André Lureau > > --- > server/display-channel.c | 9 - > server/display-channel.h | 8 +++- > server/red_worker.c | 31 +++ > 3 files changed, 30 insertions(+), 18 deletions(-) > >

Re: [Spice-devel] [PATCH 4/7] worker: remove cursor channel asserts

2015-11-12 Thread Fabiano Fidêncio
On Thu, Nov 12, 2015 at 3:00 PM, Frediano Ziglio wrote: > From: Marc-André Lureau > > --- > server/cursor-channel.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/server/cursor-channel.c b/server/cursor-channel.c > index aafc807..794dcf3 100644 > --- a/server/curs

Re: [Spice-devel] [PATCH 2/7] worker: Move stream functions to stream.c

2015-11-12 Thread Fabiano Fidêncio
On Thu, Nov 12, 2015 at 3:00 PM, Frediano Ziglio wrote: > From: Jonathon Jongsma > > --- > server/display-channel.h | 17 +++- > server/red_worker.c | 105 > --- > server/stream.c | 70 +++ > server/stre

Re: [Spice-devel] [PATCH 6/7] worker: don't use weird RedCompressedBuf nbytes shifting

2015-11-12 Thread Fabiano Fidêncio
On Thu, Nov 12, 2015 at 3:01 PM, Frediano Ziglio wrote: > From: Marc-André Lureau > > --- > server/display-channel.h | 3 +-- > server/red_worker.c | 20 ++-- > 2 files changed, 11 insertions(+), 12 deletions(-) > > diff --git a/server/display-channel.h b/server/display-cha

Re: [Spice-devel] [PATCH 1/7] worker: remove current_add assert

2015-11-12 Thread Fabiano Fidêncio
On Thu, Nov 12, 2015 at 3:00 PM, Frediano Ziglio wrote: > From: Marc-André Lureau > > --- > server/red_worker.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/server/red_worker.c b/server/red_worker.c > index 6bc015f..d33a352 100644 > --- a/server/red_worker.c > +++ b/s

Re: [Spice-devel] [PATCH 1/5] worker: Move stream functions to stream.c

2015-11-12 Thread Fabiano Fidêncio
On Thu, Nov 12, 2015 at 3:01 PM, Pavel Grunt wrote: > Hi, > > On Wed, 2015-11-11 at 00:29 +0100, Fabiano Fidêncio wrote: >> On Tue, Nov 10, 2015 at 9:41 PM, Jonathon Jongsma >> wrote: >> > --- >> > server/display-channel.h | 17 +++- >> > server/red_worker.c | 103

Re: [Spice-devel] [PATCH 10/11] worker: fix compiling with COMPRESS_STAT enabled

2015-11-12 Thread Frediano Ziglio
> On Wed, Nov 11, 2015 at 3:58 PM, Frediano Ziglio wrote: > >> > >> On Wed, Nov 11, 2015 at 1:20 PM, Frediano Ziglio > >> wrote: > >> > Signed-off-by: Frediano Ziglio > >> > --- > >> > server/display-channel.c | 2 +- > >> > server/red_worker.c | 18 +- > >> > server/sta

Re: [Spice-devel] [PATCH 09/11] worker: fix some fields access

2015-11-12 Thread Frediano Ziglio
> > On Wed, Nov 11, 2015 at 1:20 PM, Frediano Ziglio wrote: > > From: Marc-André Lureau > > > > --- > > server/display-channel.c | 18 +- > > 1 file changed, 9 insertions(+), 9 deletions(-) > > > > diff --git a/server/display-channel.c b/server/display-channel.c > > index 163f6b

Re: [Spice-devel] [PATCH 1/5] worker: Move stream functions to stream.c

2015-11-12 Thread Pavel Grunt
Hi, On Wed, 2015-11-11 at 00:29 +0100, Fabiano Fidêncio wrote: > On Tue, Nov 10, 2015 at 9:41 PM, Jonathon Jongsma wrote: > > --- > >  server/display-channel.h |  17 +++- > >  server/red_worker.c  | 103 -- > > - > >  server/stream.c  |  

[Spice-devel] [PATCH 7/7] worker: painfully move display_channel_add_drawable

2015-11-12 Thread Frediano Ziglio
From: Marc-André Lureau --- server/display-channel.c | 541 server/display-channel.h | 53 ++- server/red_worker.c | 1054 ++ server/red_worker.h |1 + server/stream.c | 360 server/s

[Spice-devel] [PATCH 6/7] worker: don't use weird RedCompressedBuf nbytes shifting

2015-11-12 Thread Frediano Ziglio
From: Marc-André Lureau --- server/display-channel.h | 3 +-- server/red_worker.c | 20 ++-- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/server/display-channel.h b/server/display-channel.h index 12ef60a..599cce7 100644 --- a/server/display-channel.h +++

[Spice-devel] [PATCH 4/7] worker: remove cursor channel asserts

2015-11-12 Thread Frediano Ziglio
From: Marc-André Lureau --- server/cursor-channel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/cursor-channel.c b/server/cursor-channel.c index aafc807..794dcf3 100644 --- a/server/cursor-channel.c +++ b/server/cursor-channel.c @@ -223,7 +223,7 @@ static voi

[Spice-devel] [PATCH 0/7] Backported some patches from refactory branches (12th Nov)

2015-11-12 Thread Frediano Ziglio
This patchset supersedes last patchset. Changes: - rebased; - merged regression fix from Pavel; - removed merged patches; - many patches in the branch (one already posted) was changed to fix statistics and lz4 code; - added a patch from refactory branch. Excluded "worker: simplify RedCompressBu

[Spice-devel] [PATCH 1/7] worker: remove current_add assert

2015-11-12 Thread Frediano Ziglio
From: Marc-André Lureau --- server/red_worker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/red_worker.c b/server/red_worker.c index 6bc015f..d33a352 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -2254,7 +2254,7 @@ static inline int current_add(RedW

[Spice-devel] [PATCH 5/7] worker: move compression parameters to dcc

2015-11-12 Thread Frediano Ziglio
From: Marc-André Lureau --- server/display-channel.c | 9 - server/display-channel.h | 8 +++- server/red_worker.c | 31 +++ 3 files changed, 30 insertions(+), 18 deletions(-) diff --git a/server/display-channel.c b/server/display-channel.c index f

[Spice-devel] [PATCH 2/7] worker: Move stream functions to stream.c

2015-11-12 Thread Frediano Ziglio
From: Jonathon Jongsma --- server/display-channel.h | 17 +++- server/red_worker.c | 105 --- server/stream.c | 70 +++ server/stream.h | 12 +- 4 files changed, 104 insertions(+), 100 delet

Re: [Spice-devel] [PATCH 10/11] worker: fix compiling with COMPRESS_STAT enabled

2015-11-12 Thread Fabiano Fidêncio
On Wed, Nov 11, 2015 at 3:58 PM, Frediano Ziglio wrote: >> >> On Wed, Nov 11, 2015 at 1:20 PM, Frediano Ziglio wrote: >> > Signed-off-by: Frediano Ziglio >> > --- >> > server/display-channel.c | 2 +- >> > server/red_worker.c | 18 +- >> > server/stat.h| 6 +++

Re: [Spice-devel] [PATCH spice-server] worker: Remove usage of streaming_video global in DisplayChannel

2015-11-12 Thread Fabiano Fidêncio
On Thu, Nov 12, 2015 at 1:24 PM, Pavel Grunt wrote: > Avoid creating streams for every image due to not properly initialized > DisplayChannel->stream_video field. > > Regression since: 4987df8e67f48cde13d39f4e81909f672ae33e29 > --- > server/red_worker.c | 12 ++-- > 1 file changed, 6 inse

Re: [Spice-devel] [PATCH 06/11] worker: move some tree container functions

2015-11-12 Thread Frediano Ziglio
> > On Wed, Nov 11, 2015 at 5:10 PM, Frediano Ziglio wrote: > >> > >> On Wed, Nov 11, 2015 at 1:20 PM, Frediano Ziglio > >> wrote: > >> > From: Marc-André Lureau > >> > > >> > --- > >> > server/red_worker.c | 32 > >> > server/tree.c | 27

[Spice-devel] [PATCH spice-server] worker: Remove usage of streaming_video global in DisplayChannel

2015-11-12 Thread Pavel Grunt
Avoid creating streams for every image due to not properly initialized DisplayChannel->stream_video field. Regression since: 4987df8e67f48cde13d39f4e81909f672ae33e29 --- server/red_worker.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/red_worker.c b/serv

Re: [Spice-devel] [PATCH] worker: move stream to display channel

2015-11-12 Thread Pavel Grunt
Hi, I just found out that the patch caused regression - it keeps creating streams for everything - I can see ~0.5 second delay on my fedora guest (running locally).  I am investigating. Pavel On Tue, 2015-11-10 at 12:42 -0500, Frediano Ziglio wrote: > > Thanks, it maintains the existing behavior