Displaying 20 results from an estimated 1000 matches similar to: "[PATCH libnbd] python: Add AIO buffer is_zero method."
2019 Aug 10
0
[PATCH libnbd 1/5] python: Change aio_buffer into nbd.Buffer class.
Create a class for AIO buffers. This is a mostly neutral code
refactoring, but we add a convenient function for getting the size of
the buffer (same as previous commit for OCaml).
---
generator/generator | 111 +++++++++++++++++------------
python/handle.c | 26 +++++--
python/t/500-aio-pread.py | 4 +-
python/t/505-aio-pread-callback.py | 10 +--
2018 Aug 01
0
[PATCH v2 nbdkit 4/6] common: Add a directory for common code shared by plugins and filters.
Currently this adds two useful header files containing functions which
will be consumed by filters in later commits.
---
Makefile.am | 5 +++-
common/include/Makefile.am | 39 ++++++++++++++++++++++++
common/include/ispowerof2.h | 50 +++++++++++++++++++++++++++++++
common/include/iszero.h | 60 +++++++++++++++++++++++++++++++++++++
configure.ac | 1 +
5
2020 Jan 30
0
Re: [PATCH libnbd] python: Add AIO buffer is_zero method.
On 1/30/20 8:05 AM, Richard W.M. Jones wrote:
> Fast testing whether the AIO buffer (or regions within it) contain all
> zeroes, which allows Python code to quickly do sparsification when
> copying.
>
> This includes the iszero.h header from nbdkit which is distributed
> under a compatible license.
> ---
> common/include/Makefile.am | 5 +--
>
2020 Jan 30
0
Re: [PATCH libnbd] python: Add AIO buffer is_zero method.
On Thu, Jan 30, 2020 at 02:29:21PM +0000, Richard W.M. Jones wrote:
>On Thu, Jan 30, 2020 at 08:16:30AM -0600, Eric Blake wrote:
>> On 1/30/20 8:05 AM, Richard W.M. Jones wrote:
>> >Fast testing whether the AIO buffer (or regions within it) contain all
>> >zeroes, which allows Python code to quickly do sparsification when
>> >copying.
>> >
>>
2018 Aug 01
2
Re: [PATCH v2 nbdkit 4/6] common: Add a directory for common code shared by plugins and filters.
On Wed, Aug 1, 2018 at 2:14 PM Richard W.M. Jones <rjones@redhat.com> wrote:
> Currently this adds two useful header files containing functions which
> will be consumed by filters in later commits.
> ---
> Makefile.am | 5 +++-
> common/include/Makefile.am | 39 ++++++++++++++++++++++++
> common/include/ispowerof2.h | 50 +++++++++++++++++++++++++++++++
2020 Jan 30
2
Re: [PATCH libnbd] python: Add AIO buffer is_zero method.
On Thu, Jan 30, 2020 at 08:16:30AM -0600, Eric Blake wrote:
> On 1/30/20 8:05 AM, Richard W.M. Jones wrote:
> >Fast testing whether the AIO buffer (or regions within it) contain all
> >zeroes, which allows Python code to quickly do sparsification when
> >copying.
> >
> >This includes the iszero.h header from nbdkit which is distributed
> >under a compatible
2018 Aug 01
0
Re: [PATCH v2 nbdkit 4/6] common: Add a directory for common code shared by plugins and filters.
On Wed, Aug 01, 2018 at 04:24:58PM +0300, Nir Soffer wrote:
> On Wed, Aug 1, 2018 at 2:14 PM Richard W.M. Jones <rjones at redhat.com> wrote:
>
> > Currently this adds two useful header files containing functions which
> > will be consumed by filters in later commits.
> > ---
> > Makefile.am | 5 +++-
> > common/include/Makefile.am | 39
2017 Apr 19
2
[PATCH] daemon: Move the useful 'is_zero' function into common code.
This is largely a simple refactoring, but it combines another
definition of this function from virt-builder which had a slightly
different prototype.
---
builder/pxzcat-c.c | 20 +-------------------
daemon/daemon.h | 18 ------------------
lib/guestfs-internal-all.h | 18 ++++++++++++++++++
3 files changed, 19 insertions(+), 37 deletions(-)
diff --git a/builder/pxzcat-c.c
2020 Jan 30
1
Re: [PATCH libnbd] python: Add AIO buffer is_zero method.
On Thu, Jan 30, 2020 at 04:16:09PM +0100, Martin Kletzander wrote:
> I know this probably got answered somewhere, but I've never gotten
> any when asking myself. So let me use this opportunity.
>
> Because I really despise useless processes and duplicated
> information I always hated the way all the "mandatory" file headers.
> As far as I understand it's
2017 Apr 19
0
Re: [PATCH] daemon: Move the useful 'is_zero' function into common code.
On 04/19/2017 09:17 AM, Richard W.M. Jones wrote:
> This is largely a simple refactoring, but it combines another
> definition of this function from virt-builder which had a slightly
> different prototype.
> ---
> +/* Return true iff the buffer is all zero bytes.
> + *
> + * Note that gcc is smart enough to optimize this properly:
> + *
2017 Apr 20
0
Re: [PATCH v2 0/2] daemon: Move the useful 'is_zero' function into common code.
On Wednesday, 19 April 2017 18:46:37 CEST Richard W.M. Jones wrote:
> v1 -> v2:
>
> The first patch is the same (the pure refactoring), but in the second
> patch I implement Eric Blake's suggested version.
LGTM -- can you please add Eric's text to the comment of is_zero, so
it is easier to remember why the 16-bytes trick is done?
Thanks,
--
Pino Toscano
2019 Jan 01
0
[PATCH nbdkit v2 1/4] common/bitmap: Add bitmap_next function and tests.
It's useful to be able to search for the next non-zero entry in a
bitmap. This commit adds a ?bitmap_next? function to do that.
Because the bitmap is just a uint8_t buffer, using fast string
functions we should be able to do this quickly even if the bitmap is
sparse. (However the actual implementation is not optimized since
that is quite complicated - see to-do comments in
2017 Apr 19
1
Re: [PATCH] daemon: Move the useful 'is_zero' function into common code.
On Wed, Apr 19, 2017 at 09:35:16AM -0500, Eric Blake wrote:
> On 04/19/2017 09:17 AM, Richard W.M. Jones wrote:
> > This is largely a simple refactoring, but it combines another
> > definition of this function from virt-builder which had a slightly
> > different prototype.
> > ---
>
> > +/* Return true iff the buffer is all zero bytes.
> > + *
> > +
2019 Jan 02
0
[PATCH nbdkit v2 1/2] Annotate internal function parameters with attribute((nonnull)).
Annotate some function parameters with attribute((nonnull)). Only do
this for internal headers where we are sure that we will be using
sufficiently recent GCC or Clang. For the public header files
(ie. include/nbdkit-*.h) it may be that people building out of tree
plugins are using old GCC which had problems, or even other compilers
that don't support this extension at all.
Libvirt has an
2017 Apr 19
4
[PATCH v2 0/2] daemon: Move the useful 'is_zero' function into common code.
v1 -> v2:
The first patch is the same (the pure refactoring), but in the second
patch I implement Eric Blake's suggested version.
Rich.
2013 Mar 19
0
[LLVMdev] setCC and brcond
Hi there,
I am currently trying to create an LLVM Backend for a RISC architecture
and running into problems with setCC and brcond.
First a few explanations:
The architecture doesn't have a dedicated flag register, but seven
1-bit-wide so called "condition registers", c0-c6,
which can be set by e.g. a compare instruction:
> cmp ne, c0, r1, 123
It also supports conditional
2023 Mar 01
6
[libnbd PATCH 0/6] common: catch up with nbdkit
If we compare the "common" subdirectory between nbdkit @ 6b4178d0fdfe
("ci: Temporarily disable perl in MacOS", 2023-02-27) and libnbd @
d05cd8f384a7 ("Version 1.15.11.", 2023-02-28), we find differences. We
can categorize these differences along two (orthogonal) axes:
- Intentional or unintentional.
Intentional differences are for example when one of the libnbd
2018 Aug 01
12
[PATCH v2 nbdkit 0/6] Add truncate filter and other fixes.
I have dropped the map filter from this series for now while I try to
get it working.
However I think the truncate filter is in a good shape. This
incorporates all feedback from Eric's review.
Also there are three small fixes to the filter code, all revealed when
I was testing using multiple filters which we'd not done much of
before.
Rich.
2019 Aug 15
2
[nbdkit PATCH] data, memory: Optimize .zero > PAGE_SIZE
When sparse_array_zero() is used for a range larger than a page,
there's no need to waste time in memset() or is_zero() - we already
know the page will be free()d.
Signed-off-by: Eric Blake <eblake@redhat.com>
---
Here's a fun one :)
common/sparse/sparse.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/common/sparse/sparse.c b/common/sparse/sparse.c
2020 Jul 07
0
Re: [nbdkit PATCH] RFC tests: Avoid odd test behavior under NDEBUG
On Tue, Jul 07, 2020 at 09:51:53AM -0500, Eric Blake wrote:
> While we support compilation with CFLAGS=-DNDEBUG for the brave user
> desiring to avoid assertion overhead, this causes the tests to be less
> powerful. Fortunately, a quick test of './configure CFLAGS=-DNDEBUG'
> didn't hit any test failures, but it seems better to just ensure that
> assertions always work