[PATCH V2 05/13] block: only account passthrough IO from userspace
Christoph Hellwig
hch at lst.de
Wed Jan 26 00:10:52 PST 2022
On Wed, Jan 26, 2022 at 03:21:04PM +0800, Ming Lei wrote:
> > I think the right way would be to just remove this branch entirely.
> > This means we only account bios with a block_device, which implies
> > they have a gendisk.
>
> That will not account userspace IO, and people may complain.
>
> We can just account passthrough request from userspace by the patch
> in my last email.
Let's take a step back: what I/O do we want to account, and how
do we want to archive that?
Assuming accounting is enabled:
- current mainline accounts all I/O one queues that have a gendisk
- your original patch accounts file system I/O and some passthrough I/O
that has a special flag set
Dropping the conditional to grab a bdev from the queue leaves us with
the following rule:
- all I/O that has a bio and bdev is accounted. This requires
passthrough I/O to explicitly set the bdev in case we haven't
done so, and it requires them to have a bio at all
I guess you are worried about the latter conditionin that we stop
accounting for no data transfer passthrough commands?
More information about the Linux-nvme
mailing list