Displaying 20 results from an estimated 50 matches for "next_zero".
2017 Jun 15
0
[virtio-dev] Re: [PATCH v11 3/6] virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS
...il cleanly.
OK, thanks.
>> +static void convert_bmap_to_chunks(struct virtio_balloon *vb,
>> + struct virtqueue *vq,
>> + unsigned long *bmap,
>> + unsigned long pfn_start,
>> + unsigned long size)
>> +{
>> + unsigned long next_one, next_zero, pos = 0;
>> + u64 chunk_base_addr;
>> + u32 chunk_size;
>> +
>> + while (pos < size) {
>> + next_one = find_next_bit(bmap, size, pos);
>> + /*
>> + * No "1" bit found, which means that there is no pfn
>> + * recorded in the rest of...
2017 Jun 13
5
[PATCH v11 3/6] virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS
...ay. I'll send a patch to at least fail cleanly.
> +static void convert_bmap_to_chunks(struct virtio_balloon *vb,
> + struct virtqueue *vq,
> + unsigned long *bmap,
> + unsigned long pfn_start,
> + unsigned long size)
> +{
> + unsigned long next_one, next_zero, pos = 0;
> + u64 chunk_base_addr;
> + u32 chunk_size;
> +
> + while (pos < size) {
> + next_one = find_next_bit(bmap, size, pos);
> + /*
> + * No "1" bit found, which means that there is no pfn
> + * recorded in the rest of this bmap.
> + */
> +...
2017 Jun 13
5
[PATCH v11 3/6] virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS
...ay. I'll send a patch to at least fail cleanly.
> +static void convert_bmap_to_chunks(struct virtio_balloon *vb,
> + struct virtqueue *vq,
> + unsigned long *bmap,
> + unsigned long pfn_start,
> + unsigned long size)
> +{
> + unsigned long next_one, next_zero, pos = 0;
> + u64 chunk_base_addr;
> + u32 chunk_size;
> +
> + while (pos < size) {
> + next_one = find_next_bit(bmap, size, pos);
> + /*
> + * No "1" bit found, which means that there is no pfn
> + * recorded in the rest of this bmap.
> + */
> +...
2017 May 04
0
[PATCH v10 3/6] virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS
...);
+ if (chunk_num == VIRTIO_BALLOON_MAX_PAGE_CHUNKS)
+ send_page_chunks(vb, vq);
+}
+
+static void convert_bmap_to_chunks(struct virtio_balloon *vb,
+ struct virtqueue *vq,
+ unsigned long *bmap,
+ unsigned long pfn_start,
+ unsigned long size)
+{
+ unsigned long next_one, next_zero, chunk_size, pos = 0;
+
+ while (pos < size) {
+ next_one = find_next_bit(bmap, size, pos);
+ /*
+ * No "1" bit found, which means that there is no pfn
+ * recorded in the rest of this bmap.
+ */
+ if (next_one == size)
+ break;
+ next_zero = find_next_zero_bit(bmap, size,...
2017 May 05
1
[PATCH v10 3/6] virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS
...KS)
> + send_page_chunks(vb, vq);
> +}
> +
> +static void convert_bmap_to_chunks(struct virtio_balloon *vb,
> + struct virtqueue *vq,
> + unsigned long *bmap,
> + unsigned long pfn_start,
> + unsigned long size)
> +{
> + unsigned long next_one, next_zero, chunk_size, pos = 0;
> +
> + while (pos < size) {
> + next_one = find_next_bit(bmap, size, pos);
> + /*
> + * No "1" bit found, which means that there is no pfn
> + * recorded in the rest of this bmap.
> + */
> + if (next_one == size)
> + break;
&...
2017 May 05
1
[PATCH v10 3/6] virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS
...KS)
> + send_page_chunks(vb, vq);
> +}
> +
> +static void convert_bmap_to_chunks(struct virtio_balloon *vb,
> + struct virtqueue *vq,
> + unsigned long *bmap,
> + unsigned long pfn_start,
> + unsigned long size)
> +{
> + unsigned long next_one, next_zero, chunk_size, pos = 0;
> +
> + while (pos < size) {
> + next_one = find_next_bit(bmap, size, pos);
> + /*
> + * No "1" bit found, which means that there is no pfn
> + * recorded in the rest of this bmap.
> + */
> + if (next_one == size)
> + break;
&...
2017 Jun 09
0
[PATCH v11 3/6] virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS
...m += 1;
+ if (*num == VIRTIO_BALLOON_MAX_PAGE_CHUNKS)
+ send_page_chunks(vb, vq);
+}
+
+static void convert_bmap_to_chunks(struct virtio_balloon *vb,
+ struct virtqueue *vq,
+ unsigned long *bmap,
+ unsigned long pfn_start,
+ unsigned long size)
+{
+ unsigned long next_one, next_zero, pos = 0;
+ u64 chunk_base_addr;
+ u32 chunk_size;
+
+ while (pos < size) {
+ next_one = find_next_bit(bmap, size, pos);
+ /*
+ * No "1" bit found, which means that there is no pfn
+ * recorded in the rest of this bmap.
+ */
+ if (next_one == size)
+ break;
+ next_zero = fi...
2017 May 04
8
[PATCH v10 0/6] Extend virtio-balloon for fast (de)inflating & fast live migration
This patch series implements the follow two things:
1) Optimization of balloon page transfer: instead of transferring balloon pages
to host one by one, the new mechanism transfers them in chunks.
2) A mechanism to report info of guest unused pages: the pages have been unused
at some time between when host sent command and when guest reported them. Host
uses that by tracking memory changes and
2017 May 04
8
[PATCH v10 0/6] Extend virtio-balloon for fast (de)inflating & fast live migration
This patch series implements the follow two things:
1) Optimization of balloon page transfer: instead of transferring balloon pages
to host one by one, the new mechanism transfers them in chunks.
2) A mechanism to report info of guest unused pages: the pages have been unused
at some time between when host sent command and when guest reported them. Host
uses that by tracking memory changes and
2013 Apr 03
0
[PATCH] Btrfs-progs: add a free space cache checker to fsck
..._LONG - size));
+ if (tmp == 0UL) /* Are any bits set? */
+ return result + size; /* Nope. */
+found_middle:
+ return result + __ffs(tmp);
+}
+
+/*
+ * This implementation of find_{first,next}_zero_bit was stolen from
+ * Linus'' asm-alpha/bitops.h.
+ */
+static inline unsigned long
+find_next_zero_bit(const unsigned long *addr, unsigned long size,
+ unsigned long offset)
+{
+ const unsigned long *p = addr + BITOP_WORD(offset);
+ unsigned long result = offset & ~(BITS_PER_LONG-1);
+ unsigned long tmp;
+
+ if (offset >= size)
+ return size;
+ size -= result;
+ offset %= BITS_PER_LO...
2017 Jun 09
11
[PATCH v11 0/6] Virtio-balloon Enhancement
This patch series enhances the existing virtio-balloon with the following new
features:
1) fast ballooning: transfer ballooned pages between the guest and host in
chunks, instead of one by one; and
2) cmdq: a new virtqueue to send commands between the device and driver.
Currently, it supports commands to report memory stats (replace the old statq
mechanism) and report guest unused pages.
Liang Li
2017 Jun 09
11
[PATCH v11 0/6] Virtio-balloon Enhancement
This patch series enhances the existing virtio-balloon with the following new
features:
1) fast ballooning: transfer ballooned pages between the guest and host in
chunks, instead of one by one; and
2) cmdq: a new virtqueue to send commands between the device and driver.
Currently, it supports commands to report memory stats (replace the old statq
mechanism) and report guest unused pages.
Liang Li
2019 Mar 12
0
[PATCH nbdkit] server: Implement extents/can_extents calls for plugins and filters.
...return b_conn->b->can_zero (b_conn->b, b_conn->conn);
}
+static int
+next_can_extents (void *nxdata)
+{
+ struct b_conn *b_conn = nxdata;
+ return b_conn->b->can_extents (b_conn->b, b_conn->conn);
+}
+
static int
next_can_fua (void *nxdata)
{
@@ -364,6 +371,16 @@ next_zero (void *nxdata, uint32_t count, uint64_t offset, uint32_t flags,
return b_conn->b->zero (b_conn->b, b_conn->conn, count, offset, flags, err);
}
+static int
+next_extents (void *nxdata, uint32_t count, uint64_t offset, uint32_t flags,
+ size_t *nr_extents, struct nbdkit...
2018 Jan 19
2
[nbdkit PATCH] Update filters to support FUA flags.
...+next_trim (void *nxdata, uint32_t count, uint64_t offset, uint32_t flags)
{
struct b_conn *b_conn = nxdata;
- return b_conn->b->trim (b_conn->b, b_conn->conn, count, offset, 0);
+ return b_conn->b->trim (b_conn->b, b_conn->conn, count, offset, flags);
}
static int
-next_zero (void *nxdata, uint32_t count, uint64_t offset, int may_trim)
+next_zero (void *nxdata, uint32_t count, uint64_t offset, uint32_t flags)
{
struct b_conn *b_conn = nxdata;
- uint32_t f = 0;
-
- if (may_trim)
- f |= NBDKIT_FLAG_MAY_TRIM;
-
- return b_conn->b->zero (b_conn->b, b_con...
2020 Feb 12
2
[nbdkit PATCH] filters: Remove most next_* wrappers
...kend *b_next = nxdata;
- return backend_flush (b_next, flags, err);
-}
-
-static int
-next_trim (void *nxdata, uint32_t count, uint64_t offset, uint32_t flags,
- int *err)
-{
- struct backend *b_next = nxdata;
- return backend_trim (b_next, count, offset, flags, err);
-}
-
-static int
-next_zero (void *nxdata, uint32_t count, uint64_t offset, uint32_t flags,
- int *err)
-{
- struct backend *b_next = nxdata;
- return backend_zero (b_next, count, offset, flags, err);
-}
-
-static int
-next_extents (void *nxdata, uint32_t count, uint64_t offset, uint32_t flags,
- stru...
2019 Mar 12
0
[PATCH nbdkit] server: Implement extents/can_extents calls for plugins and filters.
...return b_conn->b->can_zero (b_conn->b, b_conn->conn);
}
+static int
+next_can_extents (void *nxdata)
+{
+ struct b_conn *b_conn = nxdata;
+ return b_conn->b->can_extents (b_conn->b, b_conn->conn);
+}
+
static int
next_can_fua (void *nxdata)
{
@@ -364,6 +371,16 @@ next_zero (void *nxdata, uint32_t count, uint64_t offset, uint32_t flags,
return b_conn->b->zero (b_conn->b, b_conn->conn, count, offset, flags, err);
}
+static int
+next_extents (void *nxdata, uint32_t count, uint64_t offset, uint32_t flags,
+ struct nbdkit_extents_map *extent...
2019 Mar 13
0
[PATCH nbdkit] server: Implement extents/can_extents calls for plugins and filters.
...return b_conn->b->can_zero (b_conn->b, b_conn->conn);
}
+static int
+next_can_extents (void *nxdata)
+{
+ struct b_conn *b_conn = nxdata;
+ return b_conn->b->can_extents (b_conn->b, b_conn->conn);
+}
+
static int
next_can_fua (void *nxdata)
{
@@ -364,6 +371,16 @@ next_zero (void *nxdata, uint32_t count, uint64_t offset, uint32_t flags,
return b_conn->b->zero (b_conn->b, b_conn->conn, count, offset, flags, err);
}
+static int
+next_extents (void *nxdata, uint32_t count, uint64_t offset, uint32_t flags,
+ struct nbdkit_extents_map *extent...
2019 Aug 13
3
[nbdkit PATCH 0/2] more fast zero prep
Another couple things I noticed that are worth improving, but aren't
strictly related to implementing fast zero support.
Eric Blake (2):
server: Assert sane error responses
nozero: More efficient FUA handling
filters/nozero/nozero.c | 17 +++++++++++--
server/filters.c | 56 +++++++++++++++++++++++++++++++++--------
server/protocol.c | 32 +++++++++++++++++------
3 files
2019 Mar 26
0
[PATCH nbdkit v4 01/15] server: Implement extents/can_extents calls for plugins and filters.
...return b_conn->b->can_zero (b_conn->b, b_conn->conn);
}
+static int
+next_can_extents (void *nxdata)
+{
+ struct b_conn *b_conn = nxdata;
+ return b_conn->b->can_extents (b_conn->b, b_conn->conn);
+}
+
static int
next_can_fua (void *nxdata)
{
@@ -364,6 +371,15 @@ next_zero (void *nxdata, uint32_t count, uint64_t offset, uint32_t flags,
return b_conn->b->zero (b_conn->b, b_conn->conn, count, offset, flags, err);
}
+static int
+next_extents (void *nxdata, uint32_t count, uint64_t offset, uint32_t flags,
+ struct nbdkit_extents *extents, i...
2019 Mar 12
4
[PATCH nbdkit] server: Implement extents/can_extents calls for plugins and filters.
This tentative commit implements extents/can_extents, roughly as
discussed in the previous thread here:
https://www.redhat.com/archives/libguestfs/2019-March/msg00017.html
I can't say that I'm a big fan of having the plugin allocate an
extents array. There are no other plugin callbacks currently where we
require the plugin to allocate complex data structures (or indeed do
any allocation