Re: [PATCH 3/3] block: enable long IO requests report by default

2020-09-17 Thread Max Reitz
On 10.08.20 12:14, Denis V. Lunev wrote:
> Latency threshold is set to 10 seconds following guest request timeout
> on legacy storage controller.
> 
> Signed-off-by: Denis V. Lunev 
> CC: Vladimir Sementsov-Ogievskiy 
> CC: Stefan Hajnoczi 
> CC: Kevin Wolf 
> CC: Max Reitz 
> ---
>  blockdev.c | 7 ++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/blockdev.c b/blockdev.c
> index 66158d1292..733fdd36da 100644
> --- a/blockdev.c
> +++ b/blockdev.c
> @@ -622,8 +622,13 @@ static BlockBackend *blockdev_init(const char *file, 
> QDict *bs_opts,
>  
>  bs->detect_zeroes = detect_zeroes;
>  
> +/*
> + * Set log threshold to 10 seconds. Timeout choosen by observation

*chosen

> + * of the guest behavior with legacy storage controllers. Linux
> + * could remount FS read-only if journal write takes this time.
> + */
>  block_acct_setup(blk_get_stats(blk), account_invalid, account_failed,
> -qemu_opt_get_number(opts, "latency-log-threshold", 0));
> +qemu_opt_get_number(opts, "latency-log-threshold", 1));

Yeah, why not.

Reviewed-by: Max Reitz 



signature.asc
Description: OpenPGP digital signature


[PATCH 3/3] block: enable long IO requests report by default

2020-08-10 Thread Denis V. Lunev
Latency threshold is set to 10 seconds following guest request timeout
on legacy storage controller.

Signed-off-by: Denis V. Lunev 
CC: Vladimir Sementsov-Ogievskiy 
CC: Stefan Hajnoczi 
CC: Kevin Wolf 
CC: Max Reitz 
---
 blockdev.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/blockdev.c b/blockdev.c
index 66158d1292..733fdd36da 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -622,8 +622,13 @@ static BlockBackend *blockdev_init(const char *file, QDict 
*bs_opts,
 
 bs->detect_zeroes = detect_zeroes;
 
+/*
+ * Set log threshold to 10 seconds. Timeout choosen by observation
+ * of the guest behavior with legacy storage controllers. Linux
+ * could remount FS read-only if journal write takes this time.
+ */
 block_acct_setup(blk_get_stats(blk), account_invalid, account_failed,
-qemu_opt_get_number(opts, "latency-log-threshold", 0));
+qemu_opt_get_number(opts, "latency-log-threshold", 1));
 
 if (!parse_stats_intervals(blk_get_stats(blk), interval_list, errp)) {
 blk_unref(blk);
-- 
2.17.1




[PATCH 3/3] block: enable long IO requests report by default

2020-08-05 Thread Denis V. Lunev
Latency threshold is set to 10 seconds following guest request timeout
on legacy storage controller.

Signed-off-by: Denis V. Lunev 
CC: Vladimir Sementsov-Ogievskiy 
CC: Stefan Hajnoczi 
CC: Kevin Wolf 
CC: Max Reitz 
---
 blockdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/blockdev.c b/blockdev.c
index 66158d1292..9eb58efc2b 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -623,7 +623,8 @@ static BlockBackend *blockdev_init(const char *file, QDict 
*bs_opts,
 bs->detect_zeroes = detect_zeroes;
 
 block_acct_setup(blk_get_stats(blk), account_invalid, account_failed,
-qemu_opt_get_number(opts, "latency-log-threshold", 0));
+qemu_opt_get_number(opts, "latency-log-threshold",
+1 /* ms */));
 
 if (!parse_stats_intervals(blk_get_stats(blk), interval_list, errp)) {
 blk_unref(blk);
-- 
2.17.1