[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v2 07/22] block: Add statistics for failed and i
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-block] [PATCH v2 07/22] block: Add statistics for failed and invalid I/O operations |
Date: |
Tue, 13 Oct 2015 16:42:33 +0100 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Fri, Oct 02, 2015 at 05:26:17PM +0300, Alberto Garcia wrote:
> +void block_acct_failed(BlockAcctStats *stats, BlockAcctCookie *cookie)
> +{
> + int64_t time_ns = qemu_clock_get_ns(clock_type);
> +
> + assert(cookie->type < BLOCK_MAX_IOTYPE);
> +
> + stats->failed_ops[cookie->type]++;
> + stats->total_time_ns[cookie->type] += time_ns - cookie->start_time_ns;
> + stats->last_access_time_ns = time_ns;
> +}
> +
> +void block_acct_invalid(BlockAcctStats *stats, enum BlockAcctType type)
> +{
> + assert(type < BLOCK_MAX_IOTYPE);
> +
> + stats->invalid_ops[type]++;
> + stats->last_access_time_ns = qemu_clock_get_ns(clock_type);
> +}
block_acct_failed() updates total_time_ns[] but block_acct_invalid()
does not. I guess that's because block_acct_invalid() is expected to
happen during request submission and has effectively 0 duration?
This deserves a comment.
- Re: [Qemu-block] [PATCH v2 02/22] ide: Account for write operations correctly, (continued)
[Qemu-block] [PATCH v2 07/22] block: Add statistics for failed and invalid I/O operations, Alberto Garcia, 2015/10/08
- Re: [Qemu-block] [PATCH v2 07/22] block: Add statistics for failed and invalid I/O operations,
Stefan Hajnoczi <=
[Qemu-block] [PATCH v2 09/22] block: Compute minimum, maximum and average I/O latencies, Alberto Garcia, 2015/10/08
[Qemu-block] [PATCH v2 19/22] ide: Account for failed and invalid operations, Alberto Garcia, 2015/10/08
[Qemu-block] [PATCH v2 21/22] scsi-disk: Account for failed operations, Alberto Garcia, 2015/10/08
[Qemu-block] [PATCH v2 01/22] xen_disk: Account for flush operations, Alberto Garcia, 2015/10/08
[Qemu-block] [PATCH v2 15/22] nvme: Account for failed and invalid operations, Alberto Garcia, 2015/10/08
[Qemu-block] [PATCH v2 17/22] xen_disk: Account for failed and invalid operations, Alberto Garcia, 2015/10/08
[Qemu-block] [PATCH v2 16/22] virtio-blk: Account for failed and invalid operations, Alberto Garcia, 2015/10/08
[Qemu-block] [PATCH v2 12/22] qemu-io: Account for failed, invalid and flush operations, Alberto Garcia, 2015/10/08