public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>, pve-devel@lists.proxmox.com
Subject: Re: [PATCH qemu] fdmon-io_uring: avoid idle event loop being accounted as IO wait
Date: Tue, 28 Apr 2026 16:41:46 +0200	[thread overview]
Message-ID: <43287141-78a6-4524-a7ce-573f6098d079@proxmox.com> (raw)
In-Reply-To: <525c4dad-6d04-41f0-8a21-9302b0c6baa4@proxmox.com>

Am 24.04.26 um 11:12 AM schrieb Fiona Ebner:
> Am 23.04.26 um 10:37 PM schrieb Thomas Lamprecht:
>> Am 23.04.26 um 17:34 schrieb Fiona Ebner:
>>> Am 22.04.26 um 4:54 PM schrieb Fiona Ebner:
>>>> @@ -317,6 +319,12 @@ struct AioContext {
>>>>  
>>>>      /* Pending callback state for cqe handlers */
>>>>      CqeHandlerSimpleQ cqe_handler_ready_list;
>>>> +
>>>> +    /*
>>>> +     * Number of in-flight requests to be accounted for IO wait.
>>>> +     * Must be accessed using atomics.
>>
>> why though? AioContext is strictly single-threaded nowadays and (enqueue)
>> and process_cqe (dequeue) run on the owning thread. Or is this just
>> defensive protection for potential future changes - as it's cheap I'm
>> fine with it, just wanted to know if I'm overlooking something here.
> 
> No, looking over it again, I think you are right. I was under the
> impression that somehow vCPUs might also add SQEs, but no, that happens
> in the iothread already.

vCPU threads might reach fdmon_io_uring_wait() via aio_poll() (e.g. via
virtio_scsi_dataplane_stop() during Linux guest boot), so atomics are
really necessary.




  reply	other threads:[~2026-04-28 14:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-14 21:09 [PATCH qemu] fdmon-io_uring: avoid idle event loop being accounted as IO wait Thomas Lamprecht
2026-04-22 14:55 ` Fiona Ebner
2026-04-23 15:36   ` Fiona Ebner
2026-04-23 20:39     ` Thomas Lamprecht
2026-04-24  9:13       ` Fiona Ebner
2026-04-28 14:41         ` Fiona Ebner [this message]
2026-04-28 14:52           ` Thomas Lamprecht

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=43287141-78a6-4524-a7ce-573f6098d079@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=t.lamprecht@proxmox.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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal