Re: [Spice-devel] [PATCH x11spice v3 3/3] Add cache for SHM segments

2019-08-16 Thread Frediano Ziglio
> > Add a cache to allow the reuse of SHM segments. > Shared memory segments are added to the cache instead of being > deallocated, and the cache is searched instead of/before allocating a > new segment. > > Both the SHM segments and their attachment with the X server are cached. > > The cache c

[Spice-devel] [PATCH x11spice v3 1/3] Use unsigned int/size_t for display width/height/buffer size

2019-08-16 Thread Brendan Shanks
Signed-off-by: Brendan Shanks --- src/display.c | 8 src/display.h | 14 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/display.c b/src/display.c index 77b4d4e..3294f83 100644 --- a/src/display.c +++ b/src/display.c @@ -59,7 +59,7 @@ static xcb_scree

[Spice-devel] [PATCH x11spice v3 2/3] Create separate shm_segment_t struct for SHM segments

2019-08-16 Thread Brendan Shanks
Signed-off-by: Brendan Shanks --- doc/spice_indent | 1 + src/display.c| 30 +++--- src/display.h| 8 ++-- src/scan.c | 2 +- src/session.c| 2 +- src/spice.c | 2 +- 6 files changed, 25 insertions(+), 20 deletions(-) diff --git a/doc/spice

[Spice-devel] [PATCH x11spice v3 3/3] Add cache for SHM segments

2019-08-16 Thread Brendan Shanks
Add a cache to allow the reuse of SHM segments. Shared memory segments are added to the cache instead of being deallocated, and the cache is searched instead of/before allocating a new segment. Both the SHM segments and their attachment with the X server are cached. The cache currently has a fixe

[Spice-devel] [PATCH x11spice v3 0/3] Add cache for SHM segments

2019-08-16 Thread Brendan Shanks
Add a cache to x11spice for SHM segments. v3 rebases, fixes a bug in the next-biggest-entry handling in shm_cache_get(), and adds a comment in display.h to explain the cache size. Brendan Shanks (3): Use unsigned int/size_t for display width/height/buffer size Create separate shm_segment_t st