Displaying 11 results from an estimated 11 matches for "have_cache_reclaim".
2019 Jan 03
2
Re: [PATCH nbdkit v2 4/4] cache: Implement cache-max-size and method of reclaiming space from the cache.
...s, like 90.5, or must
they be integral? Should we enforce that low threshold < high
threshold? What does it really mean to have a threshold > 100 - that we
can never reach the high threshold?
> +/* Do we support reclaiming cache blocks? */
> +#ifdef FALLOC_FL_PUNCH_HOLE
> +#define HAVE_CACHE_RECLAIM 1
> +#else
> +#undef HAVE_CACHE_RECLAIM
> +#endif
> +
Should the man page mention that max cache size can only be enforced
with kernel support? Do we want to go further and probe whether
FALLOC_FL_PUNCH_HOLE works on $TMPDIR? (Even if the kernel supports
punching holes, there are som...
[PATCH nbdkit v3 2/2] cache: Implement cache-max-size and method of reclaiming space from the cache.
2019 Jan 03
0
[PATCH nbdkit v3 2/2] cache: Implement cache-max-size and method of reclaiming space from the cache.
...CACHE_MODE_UNSAFE,
} cache_mode;
+/* Maximum size of the cache and high/low thresholds. */
+extern int64_t max_size;
+extern int hi_thresh, lo_thresh;
+
/* Cache read requests. */
extern bool cache_on_read;
+/* Do we support reclaiming cache blocks? */
+#ifdef FALLOC_FL_PUNCH_HOLE
+#define HAVE_CACHE_RECLAIM 1
+#else
+#undef HAVE_CACHE_RECLAIM
+#endif
+
#endif /* NBDKIT_CACHE_H */
diff --git a/filters/cache/blk.c b/filters/cache/blk.c
index b256446..294f0cb 100644
--- a/filters/cache/blk.c
+++ b/filters/cache/blk.c
@@ -46,6 +46,8 @@
#include <unistd.h>
#include <fcntl.h>
#include <er...
2018 Dec 28
0
[PATCH nbdkit 9/9] cache: Implement cache-max-size and method of reclaiming space from the cache.
...CACHE_MODE_UNSAFE,
} cache_mode;
+/* Maximum size of the cache and high/low thresholds. */
+extern int64_t max_size;
+extern int hi_thresh, lo_thresh;
+
/* Cache read requests. */
extern bool cache_on_read;
+/* Do we support reclaiming cache blocks? */
+#ifdef FALLOC_FL_PUNCH_HOLE
+#define HAVE_CACHE_RECLAIM 1
+#else
+#undef HAVE_CACHE_RECLAIM
+#endif
+
#endif /* NBDKIT_CACHE_H */
diff --git a/filters/cache/blk.c b/filters/cache/blk.c
index b256446..4a7f65f 100644
--- a/filters/cache/blk.c
+++ b/filters/cache/blk.c
@@ -46,6 +46,8 @@
#include <unistd.h>
#include <fcntl.h>
#include <er...
[PATCH nbdkit v2 4/4] cache: Implement cache-max-size and method of reclaiming space from the cache.
2019 Jan 01
0
[PATCH nbdkit v2 4/4] cache: Implement cache-max-size and method of reclaiming space from the cache.
...CACHE_MODE_UNSAFE,
} cache_mode;
+/* Maximum size of the cache and high/low thresholds. */
+extern int64_t max_size;
+extern int hi_thresh, lo_thresh;
+
/* Cache read requests. */
extern bool cache_on_read;
+/* Do we support reclaiming cache blocks? */
+#ifdef FALLOC_FL_PUNCH_HOLE
+#define HAVE_CACHE_RECLAIM 1
+#else
+#undef HAVE_CACHE_RECLAIM
+#endif
+
#endif /* NBDKIT_CACHE_H */
diff --git a/filters/cache/blk.c b/filters/cache/blk.c
index b256446..6f67a7f 100644
--- a/filters/cache/blk.c
+++ b/filters/cache/blk.c
@@ -46,6 +46,8 @@
#include <unistd.h>
#include <fcntl.h>
#include <er...
[PATCH nbdkit v4 2/2] cache: Implement cache-max-size and method of reclaiming space from the cache.
2019 Jan 03
0
[PATCH nbdkit v4 2/2] cache: Implement cache-max-size and method of reclaiming space from the cache.
...OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef NBDKIT_RECLAIM_H
+#define NBDKIT_RECLAIM_H
+
+#include "bitmap.h"
+
+/* Do we support reclaiming cache blocks? */
+#ifdef FALLOC_FL_PUNCH_HOLE
+#define HAVE_CACHE_RECLAIM 1
+#else
+#undef HAVE_CACHE_RECLAIM
+#endif
+
+extern void reclaim (int fd, struct bitmap *bm);
+
+#endif /* NBDKIT_RECLAIM_H */
diff --git a/filters/cache/blk.c b/filters/cache/blk.c
index b256446..028eedb 100644
--- a/filters/cache/blk.c
+++ b/filters/cache/blk.c
@@ -54,6 +54,7 @@
#include "...
[PATCH nbdkit v3 0/2] cache: Implement cache-max-size and method of reclaiming space from the cache.
2019 Jan 03
3
[PATCH nbdkit v3 0/2] cache: Implement cache-max-size and method of reclaiming space from the cache.
Patch 1 is the same as last time, except for a minor comment fix.
Patch 2 should address everything that Eric mentioned in his review,
and has been retested.
Rich.
2019 Jan 01
7
[PATCH nbdkit v2 0/4] cache: Implement cache-max-size etc.
These are essentially identical to what was previously posted as
patches 6/9 through 9/9 here:
https://www.redhat.com/archives/libguestfs/2018-December/msg00145.html
except that it has been rebased onto the current git master and
retested thoroughly.
Rich.
2019 Jan 04
0
[PATCH nbdkit v5 3/3] cache: Implement cache-max-size and cache space reclaim.
...OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef NBDKIT_RECLAIM_H
+#define NBDKIT_RECLAIM_H
+
+#include "bitmap.h"
+
+/* Do we support reclaiming cache blocks? */
+#ifdef FALLOC_FL_PUNCH_HOLE
+#define HAVE_CACHE_RECLAIM 1
+#else
+#undef HAVE_CACHE_RECLAIM
+#endif
+
+/* Check if we need to reclaim blocks, and if so reclaim up to two
+ * blocks.
+ *
+ * Note this must be called with the blk lock held.
+ */
+extern void reclaim (int fd, struct bitmap *bm);
+
+#endif /* NBDKIT_RECLAIM_H */
diff --git a/filters/cache/b...
2019 Jan 03
4
[PATCH nbdkit v4 0/2] cache: Implement cache-max-size and method of
v3 was broken by a bad rebase, so let's forget about that one.
Compared to v2:
- Patch 1 is the same except for a minor comment change.
- Patch 2 splits the reclaim code into a separate file
(filters/cache/reclaim.c)
- Addressed Eric's comments from his review of v2.
- Retested on Linux and FreeBSD.
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 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.