Re: [Libguestfs] [libnbd PATCH 22/23] generator/C: print_wrapper: use helper variable for permitted state check

2023-04-27 Thread Laszlo Ersek
On 4/26/23 22:25, Eric Blake wrote: > On Tue, Apr 25, 2023 at 09:11:06AM +0200, Laszlo Ersek wrote: >> Use a local boolean flag for unnesting the *_in_permitted_state() function >> call. >> >> The one place where this change currently matters is [lib/api.c]: >> >>> @@ -4805,7 +4943,9 @@

Re: [Libguestfs] [PATCH 2/3] daemon/selinux-relabel: search for "invalid option" in setfiles output

2023-04-27 Thread Laszlo Ersek
On 4/26/23 16:47, Richard W.M. Jones wrote: > On Wed, Apr 26, 2023 at 04:37:21PM +0200, Laszlo Ersek wrote: >> On 4/26/23 14:59, Andrey Drobyshev wrote: >>> 'X' in the setiles' stderr doesn't necessarily mean that option 'X' >>> doesn't exist. For instance, when passing '-T' we get: "setfiles:

[Libguestfs] [PATCH nbdkit 2/2] allocators: sparse: Split the highly contended mutex

2023-04-27 Thread Richard W.M. Jones
We've long known that nbdkit-memory-plugin with the default sparse array allocator suffers because a global lock must be taken whenever any read or write operation is performed. This commit aims to safely improve performance by converting the lock into a read-write lock. The shared (read) lock

Re: [Libguestfs] [libnbd PATCH 23/23] generator/C: lib/api.c: indent arg list 2 spaces relative to function name

2023-04-27 Thread Richard W.M. Jones
All looks good, thanks: Reviewed-by: Richard W.M. Jones Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful

[Libguestfs] [PATCH nbdkit 0/2] allocators: sparse: Split the highly contended mutex

2023-04-27 Thread Richard W.M. Jones
nbdkit-memory-plugin is a RAM disk, but it is quite a slow one because of the lock we must acquire on the sparse array. Try to improve performance by changing this mutex for a read-write lock. The results are somewhat mixed. Note that in the real world, workloads which constantly update the

Re: [Libguestfs] [PATCH nbdkit 2/2] allocators: sparse: Split the highly contended mutex

2023-04-27 Thread Eric Blake
On Thu, Apr 27, 2023 at 03:19:12PM +0100, Richard W.M. Jones wrote: > We've long known that nbdkit-memory-plugin with the default sparse > array allocator suffers because a global lock must be taken whenever > any read or write operation is performed. This commit aims to safely > improve

[Libguestfs] [PATCH nbdkit 1/2] contrib: Add a test/benchmarking tool for the sparse memory plugin

2023-04-27 Thread Richard W.M. Jones
Add a contrib directory which we can use to store random tests and other contributions that we don't necessarily want to support long term or incorporate into nbdkit. Into this directory place a test program which tests nbdkit-memory-plugin with allocator=sparse. --- configure.ac |

Re: [Libguestfs] [PATCH 3/3] daemon/selinux-relabel: run setfiles with "-T 0", if supported

2023-04-27 Thread Richard W.M. Jones
Thanks, patches upstream in 7674d603e9..d0d8e67384. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch