From: Nicolas Saenz Julienne <nsaenzju@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: kwolf@redhat.com, qemu-block@nongnu.org, mtosatti@redhat.com,
qemu-devel@nongnu.org, hreitz@redhat.com, pbonzini@redhat.com
Subject: Re: [RFC] thread-pool: Add option to fix the pool size
Date: Mon, 07 Feb 2022 13:00:46 +0100 [thread overview]
Message-ID: <aca18563999f3bf4b8c6bfee5f073f54beaacda4.camel@redhat.com> (raw)
In-Reply-To: <Yfu0E5LwZ/x0EZrl@stefanha-x1.localdomain>
Hi Stefan, thanks for the review. I took note of your comments.
On Thu, 2022-02-03 at 10:53 +0000, Stefan Hajnoczi wrote:
> > Some background on my workload: I'm using IDE emulation, the guest is an
> > old RTOS that doesn't support virtio, using 'aio=native' isn't possible
> > either (unaligned IO accesses).
>
> I thought QEMU's block layer creates bounce buffers for unaligned
> accesses, handling both memory buffer alignment and LBA alignment
> necessary for aio=native,cache=none?
See block/file-posix.c:raw_co_prw() {
/*
* When using O_DIRECT, the request must be aligned to be able to use
* either libaio or io_uring interface. If not fail back to regular thread
* pool read/write code which emulates this for us if we set
* QEMU_AIO_MISALIGNED.
*/
if (s->needs_alignment && !bdrv_qiov_is_aligned(bs, qiov))
type |= QEMU_AIO_MISALIGNED;
else if (s->use_linux_io_uring)
return luring_co_submit(...);
else if (s->use_linux_aio)
return laio_co_submit(...);
return raw_thread_pool_submit(..., handle_aiocb_rw, ...);
}
bdrv_qiov_is_aligned() returns 'false' on my use-case.
I believe what you're referring to happens in handle_aiocb_rw(), but it's too
late then.
Thanks,
--
Nicolás Sáenz
next prev parent reply other threads:[~2022-02-07 12:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-02 17:52 [RFC] thread-pool: Add option to fix the pool size Nicolas Saenz Julienne
2022-02-03 10:53 ` Stefan Hajnoczi
2022-02-03 10:56 ` Daniel P. Berrangé
2022-02-03 14:19 ` Stefan Hajnoczi
2022-02-11 9:30 ` Nicolas Saenz Julienne
2022-02-11 11:32 ` Kevin Wolf
2022-02-14 10:09 ` Stefan Hajnoczi
2022-02-14 11:38 ` Kevin Wolf
2022-02-14 13:10 ` Stefan Hajnoczi
2022-02-14 14:09 ` Kevin Wolf
2022-02-07 12:00 ` Nicolas Saenz Julienne [this message]
2022-02-07 15:20 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aca18563999f3bf4b8c6bfee5f073f54beaacda4.camel@redhat.com \
--to=nsaenzju@redhat.com \
--cc=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).