[Qemu-devel] [PATCH] blkdebug: Add support for latency rules

2018-08-23 Thread Marc Olson via Qemu-devel
Allow rules to be created to inject latency into I/O operations. Signed-off-by: Marc Olson --- block/blkdebug.c| 101 ++-- docs/devel/blkdebug.txt | 30 ++ 2 files changed, 103 insertions(+), 28 deletions(-) diff --git

Re: [Qemu-devel] [PATCH] blkdebug: Add support for latency rules

2018-08-27 Thread Marc Olson via Qemu-devel
On 08/24/2018 09:11 AM, Eric Blake wrote: On 08/24/2018 12:06 AM, Marc Olson via Qemu-devel wrote: Allow rules to be created to inject latency into I/O operations. Signed-off-by: Marc Olson ---   block/blkdebug.c    | 101 ++--   docs/devel

[Qemu-devel] [PATCH v2] blkdebug: Add support for latency rules

2018-09-04 Thread Marc Olson via Qemu-devel
Sometimes storage devices can be slow to respond, due to media errors, firmware issues, SSD garbage collection, etc. This patch adds a new rule type to blkdebug that allows injection of latency to I/O operations. Similar to error injection rules, latency rules can be specified with or without an

Re: [Qemu-devel] How to emulate block I/O timeout on qemu side?

2018-11-02 Thread Marc Olson via Qemu-devel
On 11/2/18 10:49 AM, John Snow wrote: On 11/02/2018 04:11 AM, Dongli Zhang wrote: Hi, Is there any way to emulate I/O timeout on qemu side (not fault injection in VM kernel) without modifying qemu source code? For instance, I would like to observe/study/debug the I/O timeout handling of nvme,

[Qemu-devel] [PATCH v3 3/3] blkdebug: Add latency injection rule type

2018-11-11 Thread Marc Olson via Qemu-devel
Add a new rule type for blkdebug that instead of returning an error, can inject latency to an IO. Signed-off-by: Marc Olson --- block/blkdebug.c | 79 +++--- docs/devel/blkdebug.txt| 35 ++-- qapi/block-core.json | 31

[Qemu-devel] [PATCH v3 2/3] blkdebug: Extend rule check for additional types

2018-11-11 Thread Marc Olson via Qemu-devel
Break out the more common parts of the BlkdebugRule struct, and make rule_check() more explicit about operating only on error injection types so that additional rule types can be added in the future. Signed-off-by: Marc Olson --- block/blkdebug.c | 59

[Qemu-devel] [PATCH v3 1/3] blkdebug: fix one shot rule processing

2018-11-11 Thread Marc Olson via Qemu-devel
If 'once' is specified, the rule should execute just once, regardless if it is supposed to return an error or not. Take the example where you want the first IO to an LBA to succeed, but subsequent IOs to fail. You could either use state transitions, or create two rules, one with error = 0 and once

Re: [Qemu-devel] How to emulate block I/O timeout on qemu side?

2018-11-11 Thread Marc Olson via Qemu-devel
On 11/3/18 10:24 AM, Dongli Zhang wrote: Hi all, I tried with the patch at: https://lists.gnu.org/archive/html/qemu-devel/2018-09/msg00394.html The patch is applied to qemu-3.0.0. Below configuration is used to test the feature for guest VM nvme. # qemu-system-x86_64 \ -smp 4 -m 2000M

Re: [Qemu-devel] [PATCH v3 2/3] blkdebug: Extend rule check for additional types

2018-11-13 Thread Marc Olson via Qemu-devel
On 11/13/18 3:22 PM, John Snow wrote: On 11/12/18 2:06 AM, Marc Olson via Qemu-devel wrote: Break out the more common parts of the BlkdebugRule struct, and make rule_check() more explicit about operating only on error injection types so that additional rule types can be added in the future

Re: [Qemu-devel] How to emulate block I/O timeout on qemu side?

2018-11-12 Thread Marc Olson via Qemu-devel
On 11/11/18 11:36 PM, Dongli Zhang wrote: On 11/12/2018 03:13 PM, Marc Olson via Qemu-devel wrote: On 11/3/18 10:24 AM, Dongli Zhang wrote: The 'write' latency of sector=40960 is set to a very large value. When the I/O is stalled in guest due to that sector=40960 is accessed, I do see below

Re: [Qemu-devel] [Qemu-block] [PATCH v2] blkdebug: Add support for latency rules

2018-09-14 Thread Marc Olson via Qemu-devel
On 09/14/2018 01:46 PM, John Snow wrote: On 09/13/2018 12:48 PM, Marc Olson wrote: Are there further thoughts on this patch? The CI tools may have missed it since it appears to have been sent in reply to the V1 instead of as a new thread. When you send a revision out, can you send it as its

Re: [Qemu-devel] [PATCH v2] blkdebug: Add support for latency rules

2018-09-13 Thread Marc Olson via Qemu-devel
Are there further thoughts on this patch? On 09/04/2018 05:24 PM, Marc Olson wrote: Sometimes storage devices can be slow to respond, due to media errors, firmware issues, SSD garbage collection, etc. This patch adds a new rule type to blkdebug that allows injection of latency to I/O

Re: [Qemu-devel] [PATCH v3 3/3] blkdebug: Add latency injection rule type

2019-02-12 Thread Marc Olson via Qemu-devel
On 1/11/19 7:00 AM, Max Reitz wrote: On 12.11.18 08:06, Marc Olson wrote: Add a new rule type for blkdebug that instead of returning an error, can inject latency to an IO. Signed-off-by: Marc Olson --- block/blkdebug.c | 79 +++---

Re: [Qemu-devel] [PATCH v3 3/3] blkdebug: Add latency injection rule type

2019-02-13 Thread Marc Olson via Qemu-devel
On 2/13/19 7:48 AM, Max Reitz wrote: On 12.02.19 22:21, Marc Olson wrote: On 1/11/19 7:00 AM, Max Reitz wrote: On 12.11.18 08:06, Marc Olson wrote: [...] diff --git a/qapi/block-core.json b/qapi/block-core.json index d4fe710..72f7861 100644 --- a/qapi/block-core.json +++