Displaying 20 results from an estimated 3000 matches similar to: "[nbdkit PATCH] cache: Reduce use of bounce-buffer"
2018 Dec 28
0
[PATCH nbdkit 5/9] cache: Allow this filter to serve requests in parallel.
Make the implicit lock explicit, and hold it around blk_* operations.
This allows us to relax the thread model for the filter to
NBDKIT_THREAD_MODEL_PARALLEL.
---
filters/cache/blk.h | 7 ++++++
filters/cache/cache.c | 57 +++++++++++++++++++++++++++++++------------
2 files changed, 49 insertions(+), 15 deletions(-)
diff --git a/filters/cache/blk.h b/filters/cache/blk.h
index 24bf6a1..ab9134e
2019 May 13
0
[nbdkit PATCH v2 2/2] cache, cow: Reduce use of bounce-buffer
Although the time spent in memcpy/memset probably pales in comparison
to time spent in socket I/O, it's still worth worth reducing the
number of times we have to utilize a bounce buffer when we already
have aligned data.
Note that blocksize, cache, and cow all do block fragmentation and
bounce-buffer alignment; this brings the logic in cache and cow (which
were copied from one another) more
2019 May 13
0
Re: [nbdkit PATCH] cache: Reduce use of bounce-buffer
On Sat, May 11, 2019 at 03:30:04PM -0500, Eric Blake wrote:
> Although the time spent in memcpy/memset probably pales in comparison
> to time spent in socket I/O, it's still worth worth reducing the
> number of times we have to utilize a bounce buffer when we already
> have aligned data.
>
> Signed-off-by: Eric Blake <eblake@redhat.com>
> ---
>
2018 Jan 21
2
Re: [PATCH nbdkit] filters: Add copy-on-write filter.
Here's the patch (on top of the preceeding one) which uses a bitmap
instead of SEEK_DATA.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org
--4VrXvz3cwkc87Wze
2018 Feb 01
0
[nbdkit PATCH v2 1/3] backend: Rework internal/filter error return semantics
Previously, we let a plugin set an error in either thread-local
storage (nbdkit_set_error()) or errno, then connections.c would
decode which error to use. But with filters in the mix, it is
very difficult for a filter to know what error was set by the
plugin (particularly since nbdkit_set_error() has no public
counterpart for reading the thread-local storage). What's more,
if a filter does
2019 Jan 04
0
[PATCH nbdkit v5 3/3] cache: Implement cache-max-size and cache space reclaim.
The original plan was to have a background thread doing the reclaim.
However that cannot work given the design of filters, because a
background thread cannot access the next_ops struct which is only
available during requests.
Therefore we spread the work over the request threads. Each blk_*
function checks whether there is work to do, and if there is will
reclaim up to two blocks from the cache
2019 Apr 24
0
[nbdkit PATCH 4/4] filters: Check for mutex failures
Commit 975dab14 argued that for simple lock/unlock sequences, it was
easier to avoid the cleanup.h macros. But since that time, we added
additional sanity checking to the macros, at which point the
boilerplate of inlining that sanity checking is outweighed compared to
just using the macros in more places.
Signed-off-by: Eric Blake <eblake@redhat.com>
---
filters/cache/cache.c | 23
2018 Jan 20
0
[PATCH nbdkit] filters: Add copy-on-write filter.
---
configure.ac | 5 +
filters/Makefile.am | 4 +
filters/cow/Makefile.am | 65 +++++++
filters/cow/cow.c | 392 ++++++++++++++++++++++++++++++++++++++
filters/cow/nbdkit-cow-filter.pod | 162 ++++++++++++++++
tests/Makefile.am | 6 +
tests/test-cow.sh | 98 ++++++++++
7 files changed, 732
2019 May 13
3
[nbdkit PATCH v2 0/2] Bounce buffer cleanups
Based on Rich's review of my v1 that touched only cache.c, I have now
tried to bring all three filters with alignment rounding in line with
one another.
There is definitely room for future improvements once we teach nbdkit
to let filters and plugins advertise block sizes, but I'm hoping to
get NBD_CMD_CACHE implemented first.
Eric Blake (2):
blocksize: Process requests in linear order
2018 Jan 22
1
[PATCH nbdkit] filters: Add caching filter.
This adds a cache filter, which works like the COW filter in reverse.
For realistic use it needs a bit more work, especially to add limits
on the size of the cache, a more sensible cache replacement policy,
and perhaps some kind of background worker to write dirty blocks out.
Rich.
2018 Dec 01
0
[PATCH nbdkit] common: Move shared bitmap code to a common library.
The cow and cache filters both use a bitmap mapping virtual disk
blocks to status stored in the bitmap. The implementation of the
bitmaps is very similar because one was derived from the other when
the filters were implemented.
The main difference is the cow filter uses a simple bitmap (one bit
per block), whereas the cache filter uses two bits per block.
This commit abstracts the bitmap
2018 Dec 02
0
[PATCH nbdkit v2] common: Move shared bitmap code to a common library.
The cow and cache filters both use a bitmap mapping virtual disk
blocks to status stored in the bitmap. The implementation of the
bitmaps is very similar because one was derived from the other when
the filters were implemented.
The main difference is the cow filter uses a simple bitmap (one bit
per block), whereas the cache filter uses two bits per block.
This commit abstracts the bitmap
2018 Dec 03
0
[PATCH nbdkit v3] common: Move shared bitmap code to a common library.
The cow and cache filters both use a bitmap mapping virtual disk
blocks to status stored in the bitmap. The implementation of the
bitmaps is very similar because one was derived from the other when
the filters were implemented.
The main difference is the cow filter uses a simple bitmap (one bit
per block), whereas the cache filter uses two bits per block.
This commit abstracts the bitmap
2019 Jan 01
0
[PATCH nbdkit v2 3/4] cache: Implement LRU structure.
---
filters/cache/lru.h | 54 ++++++++++++++
filters/cache/blk.c | 12 +++
filters/cache/lru.c | 150 ++++++++++++++++++++++++++++++++++++++
filters/cache/Makefile.am | 2 +
4 files changed, 218 insertions(+)
diff --git a/filters/cache/lru.h b/filters/cache/lru.h
new file mode 100644
index 0000000..4faefcd
--- /dev/null
+++ b/filters/cache/lru.h
@@ -0,0 +1,54 @@
+/* nbdkit
2019 Jan 03
0
[PATCH nbdkit v4 1/2] cache: Implement LRU structure.
---
filters/cache/lru.h | 54 ++++++++++++++
filters/cache/blk.c | 12 +++
filters/cache/lru.c | 151 ++++++++++++++++++++++++++++++++++++++
filters/cache/Makefile.am | 2 +
4 files changed, 219 insertions(+)
diff --git a/filters/cache/lru.h b/filters/cache/lru.h
new file mode 100644
index 0000000..4faefcd
--- /dev/null
+++ b/filters/cache/lru.h
@@ -0,0 +1,54 @@
+/* nbdkit
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
2019 Jan 04
5
[PATCH nbdkit v5 3/3] cache: Implement cache-max-size and cache space reclaim.
v4:
https://www.redhat.com/archives/libguestfs/2019-January/msg00032.html
v5:
- Now we set the block size at run time.
I'd like to say that I was able to test this change, but
unfortunately I couldn't find any easy way to create a filesystem
on x86-64 with a block size > 4K. Ext4 doesn't support it at all,
and XFS doesn't support block size > page size (and I
2018 Jan 20
4
[PATCH nbdkit] filters: Add copy-on-write filter.
Eric, you'll probably find the design "interesting" ...
It does work, for me at least.
Rich.
2018 Dec 28
12
[PATCH nbdkit 0/9] cache: Implement cache-max-size and method of reclaiming space from the cache.
This patch series enhances the cache filter in a few ways, primarily
adding a "cache-on-read" feature (similar to qemu's copyonread); and
adding the ability to limit the cache size and the antecedent of that
which is having a method to reclaim cache blocks.
As the cache is stored as a sparse temporary file, reclaiming cache
blocks simply means punching holes in the temporary file.
2018 Dec 28
0
[PATCH nbdkit 9/9] cache: Implement cache-max-size and method of reclaiming space from the cache.
The original plan was to have a background thread doing the reclaim.
However that cannot work given the design of filters, because a
background thread cannot access the next_ops struct which is only
available during requests.
Therefore we spread the work over the request threads. Each blk_*
function checks whether there is work to do, and if there is will
reclaim up to two blocks from the cache