On Tue, Jan 26, 2021 at 4:40 PM Michael S. Tsirkin wrote:
>
> Poking at sysfs from QEMU poses a bunch of issues, for example,
> security, migration, etc. Running timers on the host is also not nice
> since it causes exits from VM ...
>
> So I agree, as a starting point let's just let user
> contro
Hi Phil,
Thanks for your feedback! Please see below.
On Wed, Jan 20, 2021 at 11:52 PM Philippe Mathieu-Daudé wrote:
>
> Hi Leonid, Marcel,
>
> On 1/20/21 9:54 PM, Leonid Bloch wrote:
> > This series introduces the following ACPI devices:
> >
> > * Battery
>
ferent AC adapter needs to be probed,
or even if a "fake" host AC adapter is to be provided, a 'sysfs_path'
property allows to override the default one.
Signed-off-by: Leonid Bloch
---
MAINTAINERS | 5 +
docs/specs/acad.txt | 24 ++
y needs to be probed, or
even if a "fake" host battery is to be provided, a 'sysfs_path' property
allows to override the default one.
Signed-off-by: Leonid Bloch
Signed-off-by: Marcel Apfelbaum
---
MAINTAINERS | 5 +
docs/specs/battery.txt
27;procfs_path' property allows to override the
default path.
Usage example (default values):
'-device button'
Is the same as:
'-device button,procfs_path=/proc/acpi/button,probe_interval=2000'
Signed-off-by: Leonid Bloch
---
MAINTAINERS
Increase the number of possible ACPI interrupts from 8, to the maximum
available: 64 by default.
Signed-off-by: Leonid Bloch
---
hw/acpi/core.c | 17 +++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/hw/acpi/core.c b/hw/acpi/core.c
index 7170bff657..71ba7c17b8
AC adapter
plugging/unplugging behaves as expected. So is the laptop lid button.
For the ease of review, these commits are also available here:
https://github.com/blochl/qemu/pull/1/commits
Thanks,
Leonid.
Leonid Bloch (4):
hw/acpi: Increase the number of possible ACPI interrupts
hw/acpi: Introd
From: Leonid Bloch
Not checking the value of malloc will cause a warning with GCC 10.1,
which may result in configuration failure, with the following line in
config.log:
config-temp/qemu-conf.c:2:18: error: ignoring return value of ‘malloc’ declared
with attribute ‘warn_unused_result’ [-Werror
Thanks, Berto!
On 8/16/19 3:17 PM, Alberto Garcia wrote:
> The size of the qcow2 L2 cache defaults to 32 MB, which can be easily
> larger than the maximum amount of L2 metadata that the image can have.
> For example: with 64 KB clusters the user would need a qcow2 image
> with a virtual size of 25
On 1/11/19 9:14 PM, Markus Armbruster wrote:
> Back in September, Leonid Block added a whole bunch of macros (commit
* Bloch. :)
> 540b8492618) to improve readability of qcow2.h a bit (commit
> b6a95c6d100). He later used them to fix the "vdi" driver's parameter
> cluster_size's default value (c
Hi,
On 1/11/19 9:14 PM, Markus Armbruster wrote:
> We define 54 macros for the powers of two >= 1024. We use six, in six
> macro definitions. Four of them could just as well use the common MiB
> macro, so do that. The remaining two can't, because they get passed
> to stringify. Replace the mac
On 1/11/19 6:23 PM, Eric Blake wrote:
> On 1/11/19 8:14 AM, Leonid Bloch wrote:
>> On 1/10/19 9:18 PM, Eric Blake wrote:
>>> Set the framework up for declaring integer options with an integer
>>> default, instead of our current insane approach of requiring the
>>
On 1/10/19 9:18 PM, Eric Blake wrote:
> Set the framework up for declaring integer options with an integer
> default, instead of our current insane approach of requiring the
> default value to be given as a string (which then has to be reparsed
> at every use that wants a number). git grep '[^.]de
On 1/10/19 2:51 PM, wrote:
> Leonid Bloch writes:
>
>> Hi,
>>
>> On 1/8/19 2:20 PM, Kevin Wolf wrote:
>>> Am 03.01.2019 um 22:33 hat Leonid Bloch geschrieben:
>>>> The lookup table for power-of-two sizes is now auto-generated during the
>>
On 1/10/19 2:40 PM, Markus Armbruster wrote:
> Leonid Bloch writes:
>
>> Hi,
>>
>> On 1/8/19 11:31 AM, Markus Armbruster wrote:
>>> I'd leave it hard-coded. Replacing a few trivial defines by an arguably
>>> less trivial script doesn't fee
Hi,
On 1/8/19 2:20 PM, Kevin Wolf wrote:
> Am 03.01.2019 um 22:33 hat Leonid Bloch geschrieben:
>> The lookup table for power-of-two sizes is now auto-generated during the
>> build, and not hard-coded into the units.h file.
>>
>> This partially reverts commit 540b849
Hi,
On 1/8/19 11:31 AM, Markus Armbruster wrote:
> I'd leave it hard-coded. Replacing a few trivial defines by an arguably
> less trivial script doesn't feel like an improvement. In this case, it
> doesn't even save lines.
As I've said, I'm fine with that. The autogeneration sounds the right
t
On 1/4/19 12:31 PM, Alberto Garcia wrote:
> On Thu 03 Jan 2019 10:42:30 PM CET, Eric Blake wrote:
>
>> In my view, code generators make sense when used on code that is
>> expected to change over time (a good example is QAPI because we add
>> new commands every release; other places might be a gene
The lookup table for power-of-two sizes is now auto-generated during the
build, and not hard-coded into the units.h file.
This partially reverts commit 540b8492618eb.
Signed-off-by: Leonid Bloch
---
.gitignore | 1 +
Makefile | 5 +++
block/qcow2.h| 2 +-
block
.h in the build directory.
* The commit message mentions the commit which is partially reverted by
the current commit.
* Small changes in the comments of the generated header file.
Leonid Bloch (1):
include: Auto-generate the sizes lookup table
.gitignore | 1 +
Makefile
Hi,
On 1/4/19 12:04 AM, Eric Blake wrote:
> On 1/3/19 2:57 PM, Leonid Bloch wrote:
>
>>> I have to say that I'm not very convinced of the benefits of replacing a
>>> set of trivial numeric macros with a longer and harder to read shell
>>> script acco
Hi Phil,
Thanks for your review! Very valid points. All taken, except the naming
(I think "pow2_sizes.h" would be better than "lookup_table_sizes.h",
no?) and the "generated" directory - I agree that it's a good idea, but
I think it requires a separate patch which moves the generated files ther
Hi Berto,
On 1/3/19 12:19 PM, Alberto Garcia wrote:
> On Wed 02 Jan 2019 12:09:05 PM CET, Leonid Bloch wrote:
>> +print_sizes() {
>> +local p=10
>> +while [ ${p} -lt 64 ]
>> +do
>> +local pad=' '
>> +local n=$((p %
The lookup table for power-of-two sizes is now auto-generated during the
build, and not hard-coded into the units.h file.
Signed-off-by: Leonid Bloch
---
.gitignore | 1 +
Makefile | 5 +++
block/qcow2.h| 2 +-
block/vdi.c | 1 +
include/qemu/units.h
o Makefile here are "standard".
Please correct me if that's not the case.
Sorry it took so much time - I was busy with something completely
different.
Regards,
Leonid.
Leonid Bloch (1):
include: Auto-generate the sizes lookup table
.gitignore | 1 +
Makefile
Hi Phil, Hi Eric,
(Eric, for some reason you weren't CC'd to this thread - sorry.)
On 11/5/18 5:58 PM, Philippe Mathieu-Daudé wrote:
> Hi Leonid,
>
> On 4/11/18 19:07, Leonid Bloch wrote:
>> The lookup table for power-of-two sizes was added in commit 540b8492618eb
>
: Leonid Bloch
---
block/vdi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/vdi.c b/block/vdi.c
index 6555cffb88..d996793f1c 100644
--- a/block/vdi.c
+++ b/block/vdi.c
@@ -85,7 +85,7 @@
#define BLOCK_OPT_STATIC "static"
#define SECTOR_SIZE 51
Please see the commit message for the rationale.
Difference from v1:
* Format string is fixed.
Leonid Bloch (1):
vdi: Use a literal number of bytes for DEFAULT_CLUSTER_SIZE
block/vdi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
2.17.1
t are correct (otherwise these values look as if
they were typed manually).
Signed-off-by: Leonid Bloch
---
include/qemu/units.h | 18 ++
1 file changed, 18 insertions(+)
diff --git a/include/qemu/units.h b/include/qemu/units.h
index 68a7758650..1c959d182e 100644
--- a/include/q
Please see the commit message for the rationale.
Difference from v1:
* Tabs removed from the code indentation of the sample code in the
comment, in order to pass checkpatch.
Leonid Bloch (1):
include: Add a comment to explain the origin of sizes' lookup table
include/qemu/units.h
> This changes the data type, so a fix is needed for a format string in
> line 434.
Yes, I saw, thanks! Will do.
>
> Regards
> Stefan
>
: Leonid Bloch
---
block/vdi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/vdi.c b/block/vdi.c
index 6555cffb88..25320eff47 100644
--- a/block/vdi.c
+++ b/block/vdi.c
@@ -85,7 +85,7 @@
#define BLOCK_OPT_STATIC "static"
#define SECTOR_SIZE 51
t are correct (otherwise these values look as if
they were typed manually).
Signed-off-by: Leonid Bloch
---
include/qemu/units.h | 18 ++
1 file changed, 18 insertions(+)
diff --git a/include/qemu/units.h b/include/qemu/units.h
index 68a7758650..051c274ca2 100644
--- a/include/q
Hi,
On 11/2/18 5:28 PM, Kevin Wolf wrote:
> Am 02.11.2018 um 15:52 hat Eric Blake geschrieben:
>> On 11/2/18 9:10 AM, Kevin Wolf wrote:
>>> Am 02.11.2018 um 13:37 hat Philippe Mathieu-Daudé geschrieben:
Hi Kevin,
On 2/11/18 12:07, Kevin Wolf wrote:
> Am 02.11.2018 um 09:58 hat P
On 10/1/18 7:59 PM, Kevin Wolf wrote:
> Am 01.10.2018 um 16:35 hat Eric Blake geschrieben:
>> On 9/29/18 4:54 AM, Leonid Bloch wrote:
>>> Fixing cache-clean-interval documentation following the recent change to
>>> a default of 600 seconds on supported plar
Fixing cache-clean-interval documentation following the recent change to
a default of 600 seconds on supported plarforms (only Linux currently).
Signed-off-by: Leonid Bloch
---
docs/qcow2-cache.txt | 19 +--
qapi/block-core.json | 3 ++-
qemu-options.hx | 3 ++-
3 files
On September 27, 2018 5:53:34 PM CEST, Eric Blake wrote:
>On 9/26/18 11:04 AM, Leonid Bloch wrote:
>> The default cache-clean-interval is set to 10 minutes, in order to
>lower
>> the overhead of the qcow2 caches (before the default was 0, i.e.
>> disabled).
>>
&g
Signed-off-by: Leonid Bloch
Reviewed-by: Alberto Garcia
Reviewed-by: Kevin Wolf
---
block/qcow2.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index 95e1c98daa..7277feda13 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -1324,7 +1324,7
'l2-cache-size' option. This option
was previously documented as the *maximum* L2 cache size, and this patch
makes it behave as such, instead of as a constant size. Also, the
existing option 'cache-size' can limit the sum of both L2 and refcount
caches, as previously.
Signed-off
for images of up to 256 GB in size (was 8 GB). Note, that only the
needed amount to cover the full image is allocated. The value which is
changed here is just the upper limit on the L2 cache size, beyond which
it will not grow, even if the size of the image will require it to.
Signed-off-by: Leonid
The default cache-clean-interval is set to 10 minutes, in order to lower
the overhead of the qcow2 caches (before the default was 0, i.e.
disabled).
* For non-Linux platforms the default is kept at 0, because
cache-clean-interval is not supported there yet.
Signed-off-by: Leonid Bloch
Signed-off-by: Leonid Bloch
Reviewed-by: Alberto Garcia
Reviewed-by: Kevin Wolf
---
block/qcow2.c | 2 +-
block/qcow2.h | 9 +
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index c13153735a..d2c07ce9fe 100644
--- a/block/qcow2.c
+++ b
The refcount cache size does not need to be set to its minimum value in
read_cache_sizes(), as it is set to at least its minimum value in
qcow2_update_options_prepare().
Signed-off-by: Leonid Bloch
Reviewed-by: Alberto Garcia
Reviewed-by: Kevin Wolf
---
block/qcow2.c | 5 ++---
1 file changed
The caches are now recalculated upon image resizing. This is done
because the new default behavior of assigning L2 cache relatively to
the image size, implies that the cache will be adapted accordingly
after an image resize.
Signed-off-by: Leonid Bloch
Reviewed-by: Alberto Garcia
---
block
*(i%10);
pad=21-int(log(n)/log(10));
printf("#define S_%d%siB %*d\n", n, s, pad, val);
}
}
Signed-off-by: Leonid Bloch
Reviewed-by: Alberto Garcia
Reviewed-by: Kevin Wolf
---
include/qemu/units.h | 55 +++
t to 0 for non-Linux platforms in
order to avoid an error, since the cache clean interval feature is
currently available only on Linux.
Differences from v10:
* Rewording documentation.
Differences from v11:
* Memory leak fixed in "Resize the cache upon image resizing".
Leonid Bl
Signed-off-by: Leonid Bloch
Reviewed-by: Alberto Garcia
Reviewed-by: Kevin Wolf
---
docs/qcow2-cache.txt | 21 ++---
qemu-options.hx | 9 ++---
2 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/docs/qcow2-cache.txt b/docs/qcow2-cache.txt
index
Oops, sorry. Would something like that be OK:
On 9/26/18 1:55 PM, Alberto Garcia wrote:
> On Wed 26 Sep 2018 12:43:03 PM CEST, Kevin Wolf wrote:
>>> +/* Update cache sizes */
>>> +options = qdict_clone_shallow(bs->options);
>>> +ret = qcow2_update_options(bs, options, s->flags, errp);
t to 0 for non-Linux platforms in
order to avoid an error, since the cache clean interval feature is
currently available only on Linux.
Differences from v10:
* Rewording documentation.
Leonid Bloch (9):
qcow2: Options' documentation fixes
include: Add a lookup table of sizes
qcow
On 9/24/18 10:34 PM, Max Reitz wrote:
On 24.09.18 18:53, Leonid Bloch wrote:
On 9/24/18 6:04 PM, Alberto Garcia wrote:
On Fri 21 Sep 2018 07:23:02 PM CEST, Leonid Bloch wrote:
Signed-off-by: Leonid Bloch
---
docs/qcow2-cache.txt | 20 +---
qemu-options.hx | 9
*(i%10);
pad=21-int(log(n)/log(10));
printf("#define S_%d%siB %*d\n", n, s, pad, val);
}
}
Signed-off-by: Leonid Bloch
Reviewed-by: Alberto Garcia
---
include/qemu/units.h | 55
1 file changed, 55 i
Signed-off-by: Leonid Bloch
---
docs/qcow2-cache.txt | 21 ++---
qemu-options.hx | 9 ++---
2 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/docs/qcow2-cache.txt b/docs/qcow2-cache.txt
index 8a09a5cc5f..7e28b41bd3 100644
--- a/docs/qcow2-cache.txt
+++ b
Signed-off-by: Leonid Bloch
Reviewed-by: Alberto Garcia
---
block/qcow2.c | 2 +-
block/qcow2.h | 9 +
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index c13153735a..d2c07ce9fe 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -830,7
The refcount cache size does not need to be set to its minimum value in
read_cache_sizes(), as it is set to at least its minimum value in
qcow2_update_options_prepare().
Signed-off-by: Leonid Bloch
Reviewed-by: Alberto Garcia
---
block/qcow2.c | 5 ++---
1 file changed, 2 insertions(+), 3
The default cache-clean-interval is set to 10 minutes, in order to lower
the overhead of the qcow2 caches (before the default was 0, i.e.
disabled).
* For non-Linux platforms the default is kept at 0, because
cache-clean-interval is not supported there yet.
Signed-off-by: Leonid Bloch
'l2-cache-size' option. This option
was previously documented as the *maximum* L2 cache size, and this patch
makes it behave as such, instead of as a constant size. Also, the
existing option 'cache-size' can limit the sum of both L2 and refcount
caches, as previously.
Signed-of
for images of up to 256 GB in size (was 8 GB). Note, that only the
needed amount to cover the full image is allocated. The value which is
changed here is just the upper limit on the L2 cache size, beyond which
it will not grow, even if the size of the image will require it to.
Signed-off-by: Leonid
Signed-off-by: Leonid Bloch
Reviewed-by: Alberto Garcia
---
block/qcow2.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index 3c1859f9cc..983d4361d7 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -1324,7 +1324,7 @@ static int
The caches are now recalculated upon image resizing. This is done
because the new default behavior of assigning L2 cache relatively to
the image size, implies that the cache will be adapted accordingly
after an image resize.
Signed-off-by: Leonid Bloch
Reviewed-by: Alberto Garcia
---
block
On 9/24/18 7:59 PM, Eric Blake wrote:
On 9/21/18 12:23 PM, Leonid Bloch wrote:
Signed-off-by: Leonid Bloch
Reviewed-by: Alberto Garcia
---
block/qcow2.c | 2 +-
block/qcow2.h | 9 +
2 files changed, 6 insertions(+), 5 deletions(-)
+++ b/block/qcow2.h
@@ -27,6 +27,7
On 9/24/18 6:04 PM, Alberto Garcia wrote:
> On Fri 21 Sep 2018 07:23:02 PM CEST, Leonid Bloch wrote:
>> Signed-off-by: Leonid Bloch
>> ---
>> docs/qcow2-cache.txt | 20 +---
>> qemu-options.hx | 9 ++---
>> 2 files change
On 9/24/18 5:09 PM, Eric Blake wrote:
> On 9/21/18 12:23 PM, Leonid Bloch wrote:
>> Adding a lookup table for the powers of two, with the appropriate size
>> prefixes. This is needed when a size has to be stringified, in which
>> case something like '(1 * KiB)' w
for images of up to 256 GB in size (was 8 GB). Note, that only the
needed amount to cover the full image is allocated. The value which is
changed here is just the upper limit on the L2 cache size, beyond which
it will not grow, even if the size of the image will require it to.
Signed-off-by: Leonid
'l2-cache-size' option. This option
was previously documented as the *maximum* L2 cache size, and this patch
makes it behave as such, instead of as a constant size. Also, the
existing option 'cache-size' can limit the sum of both L2 and refcount
caches, as previously.
Signed-of
The refcount cache size does not need to be set to its minimum value in
read_cache_sizes(), as it is set to at least its minimum value in
qcow2_update_options_prepare().
Signed-off-by: Leonid Bloch
Reviewed-by: Alberto Garcia
---
block/qcow2.c | 5 ++---
1 file changed, 2 insertions(+), 3
Signed-off-by: Leonid Bloch
Reviewed-by: Alberto Garcia
---
block/qcow2.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index f885afa0ed..ffb4a9e4a1 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -1324,7 +1324,7 @@ static int
Signed-off-by: Leonid Bloch
Reviewed-by: Alberto Garcia
---
block/qcow2.c | 2 +-
block/qcow2.h | 9 +
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index ec9e6238a0..67cc82f0b9 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -830,7
Signed-off-by: Leonid Bloch
---
docs/qcow2-cache.txt | 20 +---
qemu-options.hx | 9 ++---
2 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/docs/qcow2-cache.txt b/docs/qcow2-cache.txt
index 8a09a5cc5f..013991e21c 100644
--- a/docs/qcow2-cache.txt
+++ b
The default cache-clean-interval is set to 10 minutes, in order to lower
the overhead of the qcow2 caches (before the default was 0, i.e.
disabled).
* For non-Linux platforms the default is kept at 0, because
cache-clean-interval is not supported there yet.
Signed-off-by: Leonid Bloch
*(i%10);
pad=21-int(log(n)/log(10));
printf("#define S_%d%siB %*d\n", n, s, pad, val);
}
}
Signed-off-by: Leonid Bloch
---
include/qemu/units.h | 55
1 file changed, 55 insertions(+)
diff --git a/
The caches are now recalculated upon image resizing. This is done
because the new default behavior of assigning L2 cache relatively to
the image size, implies that the cache will be adapted accordingly
after an image resize.
Signed-off-by: Leonid Bloch
Reviewed-by: Alberto Garcia
---
block
t to 0 for non-Linux platforms in
order to avoid an error, since the cache clean interval feature is
currently available only on Linux.
Leonid Bloch (9):
qcow2: Options' documentation fixes
include: Add a lookup table of sizes
qcow2: Make sizes more humanly readable
qcow2: Avoid
On 9/21/18 3:35 PM, Alberto Garcia wrote:
On Tue 18 Sep 2018 05:29:22 PM CEST, Leonid Bloch wrote:
/* New interval for cache cleanup timer */
r->cache_clean_interval =
qemu_opt_get_number(opts, QCOW2_OPT_CACHE_CLEAN_INTERVAL,
-
On 9/21/18 3:17 PM, Alberto Garcia wrote:
On Tue 18 Sep 2018 05:29:16 PM CEST, Leonid Bloch wrote:
Adding a lookup table for the powers of two, with the appropriate size
prefixes. This is needed when a size has to be stringified, in which
case something like '(1 * KiB)' would become
'l2-cache-size' option. This option
was previously documented as the *maximum* L2 cache size, and this patch
makes it behave as such, instead of as a constant size. Also, the
existing option 'cache-size' can limit the sum of both L2 and refcount
caches, as previously.
Signed-of
Signed-off-by: Leonid Bloch
Reviewed-by: Alberto Garcia
---
block/qcow2.c | 2 +-
block/qcow2.h | 9 +
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index ec9e6238a0..67cc82f0b9 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -830,7
The default cache-clean-interval is set to 10 minutes, in order to lower
the overhead of the qcow2 caches (before the default was 0, i.e.
disabled).
Signed-off-by: Leonid Bloch
Reviewed-by: Alberto Garcia
---
block/qcow2.c| 2 +-
block/qcow2.h| 1 +
docs/qcow2-cache.txt | 4
The refcount cache size does not need to be set to its minimum value in
read_cache_sizes(), as it is set to at least its minimum value in
qcow2_update_options_prepare().
Signed-off-by: Leonid Bloch
Reviewed-by: Alberto Garcia
---
block/qcow2.c | 5 ++---
1 file changed, 2 insertions(+), 3
Signed-off-by: Leonid Bloch
Reviewed-by: Alberto Garcia
---
block/qcow2.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index f885afa0ed..ffb4a9e4a1 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -1324,7 +1324,7 @@ static int
Signed-off-by: Leonid Bloch
---
docs/qcow2-cache.txt | 20 +---
qemu-options.hx | 9 ++---
2 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/docs/qcow2-cache.txt b/docs/qcow2-cache.txt
index 8a09a5cc5f..013991e21c 100644
--- a/docs/qcow2-cache.txt
+++ b
*(i%10);
pad=21-int(log(n)/log(10));
printf("#define S_%d%siB %*d\n", n, s, pad, val);
}
}
Signed-off-by: Leonid Bloch
---
include/qemu/units.h | 55
1 file changed, 55 insertions(+)
diff --git a/
for images of up to 256 GB in size (was 8 GB). Note, that only the
needed amount to cover the full image is allocated. The value which is
changed here is just the upper limit on the L2 cache size, beyond which
it will not grow, even if the size of the image will require it to.
Signed-off-by: Leonid
The caches are now recalculated upon image resizing. This is done
because the new default behavior of assigning L2 cache relatively to
the image size, implies that the cache will be adapted accordingly
after an image resize.
Signed-off-by: Leonid Bloch
Reviewed-by: Alberto Garcia
---
block
o large L2 cache size.
* Minor documentation fixes.
Leonid Bloch (9):
qcow2: Options' documentation fixes
include: Add a lookup table of sizes
qcow2: Make sizes more humanly readable
qcow2: Avoid duplication in setting the refcount cache size
qcow2: Assign the L2 cache relatively to the image
8 um 03:07 hat Leonid Bloch geschrieben:
This series makes the qcow2 L2 cache assignment aware of the image size,
with the intention for it to cover the entire image. The importance of
this change is in noticeable performance improvement, especially with
heavy random I/O. The memory overhead is not
On 8/14/18 2:44 PM, Kevin Wolf wrote:
Am 14.08.2018 um 13:34 hat Leonid Bloch geschrieben:
On 8/14/18 11:18 AM, Kevin Wolf wrote:
Am 13.08.2018 um 18:42 hat Leonid Bloch geschrieben:
I don't actually think it's so bad to keep the cache permanently
allocated, but I wouldn't ob
On 8/14/18 11:18 AM, Kevin Wolf wrote:
Am 13.08.2018 um 18:42 hat Leonid Bloch geschrieben:
I don't actually think it's so bad to keep the cache permanently
allocated, but I wouldn't object to a lower default for non-Linux hosts
either. 1 MB may still be a little too low, 4 MB (
I don't actually think it's so bad to keep the cache permanently
allocated, but I wouldn't object to a lower default for non-Linux hosts
either. 1 MB may still be a little too low, 4 MB (covers up to 32 GB)
might be more adequate. My typical desktop VMs are larger than 8 GB, but
smaller than 32 GB
On 8/13/18 2:33 PM, Kevin Wolf wrote:
Am 11.08.2018 um 21:19 hat Leonid Bloch geschrieben:
@item refcount-cache-size
The maximum size of the refcount block cache in bytes
diff --git a/tests/qemu-iotests/137 b/tests/qemu-iotests/137
index 87965625d8..e3fb078588 100755
--- a/tests/qemu
On August 13, 2018 4:39:35 AM EEST, Max Reitz wrote:
>On 2018-08-10 14:00, Alberto Garcia wrote:
>> On Fri 10 Aug 2018 08:26:44 AM CEST, Leonid Bloch wrote:
>>> The upper limit on the L2 cache size is increased from 1 MB to 32
>MB.
>>> This is done in order to al
Signed-off-by: Leonid Bloch
---
docs/qcow2-cache.txt | 20 +---
qemu-options.hx | 9 ++---
2 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/docs/qcow2-cache.txt b/docs/qcow2-cache.txt
index 8a09a5cc5f..2326db01b9 100644
--- a/docs/qcow2-cache.txt
+++ b
The default cache-clean-interval is set to 10 minutes, in order to lower
the overhead of the qcow2 caches (before the default was 0, i.e.
disabled).
Signed-off-by: Leonid Bloch
Reviewed-by: Alberto Garcia
---
block/qcow2.c| 2 +-
block/qcow2.h| 1 +
docs/qcow2-cache.txt | 4
just the upper limit on the L2 cache size, beyond which
it will not grow, even if the size of the image will require it to.
Signed-off-by: Leonid Bloch
Reviewed-by: Alberto Garcia
---
block/qcow2.h| 2 +-
docs/qcow2-cache.txt | 4 ++--
qemu-options.hx | 2 +-
3 files changed, 4
Signed-off-by: Leonid Bloch
Reviewed-by: Alberto Garcia
---
block/qcow2.c | 2 +-
block/qcow2.h | 9 +
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index ec9e6238a0..67cc82f0b9 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -830,7
The caches are now recalculated upon image resizing. This is done
because the new default behavior of assigning L2 cache relatively to
the image size, implies that the cache will be adapted accordingly
after an image resize.
Signed-off-by: Leonid Bloch
Reviewed-by: Alberto Garcia
---
block
'l2-cache-size' option. This option
was previously documented as the *maximum* L2 cache size, and this patch
makes it behave as such, instead of as a constant size. Also, the
existing option 'cache-size' can limit the sum of both L2 and refcount
caches, as previously.
Signed-of
specified and is large enough, with the L2 and
refcount caches not set, the L2 cache will be as large as needed to
cover the entire image, and not as the default max. size. (Return to
the previous behavior in this part, which was correct).
* Cosmetic changes patch not used.
Leon
Signed-off-by: Leonid Bloch
Reviewed-by: Alberto Garcia
---
block/qcow2.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index f885afa0ed..ffb4a9e4a1 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -1324,7 +1324,7 @@ static int
The refcount cache size does not need to be set to its minimum value in
read_cache_sizes(), as it is set to at least its minimum value in
qcow2_update_options_prepare().
Signed-off-by: Leonid Bloch
---
block/qcow2.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/block
On 8/10/18 5:39 PM, Alberto Garcia wrote:
On Fri 10 Aug 2018 08:26:43 AM CEST, Leonid Bloch wrote:
Previously, the L2 cache was allocated without considering the image
size, and an option existed to manually determine its size.
This is not quite correct: the L2 cache was set to the maximum
1 - 100 of 384 matches
Mail list logo