[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v6 0/3] Support multiple ioreq pages


  • To: Julian Vetter <julian.vetter@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 3 Dec 2026 11:52:52 +0100
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=google header.d=suse.com header.i="@suse.com" header.h="Content-Transfer-Encoding:Content-Type:In-Reply-To:Autocrypt:From:Content-Language:References:Cc:To:Subject:User-Agent:MIME-Version:Date:Message-ID"
  • Autocrypt: addr=jbeulich@xxxxxxxx; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger@xxxxxxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Thu, 03 Dec 2026 10:53:00 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 03.12.2026 11:10, Julian Vetter wrote:
> 
> On 9/4/26 10:27 AM, Jan Beulich wrote:
> 
>>> But it looks like both changes in QEMU are for having more vCPU, so
>>> having both at the same time might be better.
> 
> Hello Jan and Anthony,
> thank you for your replies and sorry for my late reply. I agree, the two 
> are independent. The only thing they have in common is that each needs 
> QEMU to change how it maps the ioreq page(s).
> 
>> Growing ioreq_t (in particular the data size it can hold) doesn't have
>> anything to do with increased vCPU count, I think.
>>
>>> So yes, I'm all for less complexity, but I can't ask for this to be a
>>> blocker, especially if the other change might takes years. So far, I
>>> don't think I've seen any patches for QEMU.
>>
>> How exactly a new ioreq_t would want to look like remains to be discussed.
>> Perhaps we could go an intermediate route here: Add provisions (e.g. a
>> full page per vCPU, plus a format identifier at the start of that page),
>> allowing the enlarged ioreq_t to be put on top, yet without needing any
>> (further) changes to the map/unmap logic?
> I understand the goal. We want to only change the map/unmap logic once. 
> But I'm not sure a full page per vCPU is the right way to get there.
> 
> - It wastes most of each page. ioreq_t is 32 bytes, so a page per vCPU 
> leaves a lot of space unused. Even an ioreq_t two or four times as large 
> would still fit dozens of slots per page. With 256 vCPUs that's 256 
> pages per ioreq server (and up to 8 servers per domain), where 2 pages 
> would be enough.

ioreq_t can't stay at 32 bytes. When this was discussed, I think it was
Andrew who suggested that if we bump, we might as well bump to a full
page. While I dislike such wasting of memory / address space, I still
indicated I could live with that. If you think bumping by less is better,
you will need to make your case mainly with Andrew.

> - The series already makes map/unmap independent of the number of pages. 
> Everything is driven by nr_ioreq_pages(), so a bigger ioreq_t only needs 
> that calculation to use the slot size. Allocation, vmap(), teardown, 
> is_ioreq_server_page() and the acquire_resource frame indexing would all 
> stay as they are. I think that meets your goal without the per-vCPU page 
> cost.
> 
> - A page-per-vCPU layout can't be the default, since existing device 
> models expect the packed vcpu_ioreq[] array. It would have to be opt-in 
> at ioreq server creation, i.e. a new interface, and Xen would have to 
> support both layouts anyway.
> 
> - On the Xen side it also means tracking up to HVM_MAX_VCPUS pages per 
> server. That breaks the bounded on-stack array you asked for in v6, so 
> we'd need a different tracking mechanism.
> 
> Separately from that question, existing device models keep working 
> unchanged with the packed layout for up to 128 vCPUs.

This of course needs to be a goal, no matter what. The reason for the
request is that I think it would be better if we didn't need to consider
two separate backwards compatibility aspects in qemu (one across your
change, and another when we bump ioreq size).

> Would you be OK with me sending v7 that keeps the packed layout (with
> the remaining v6 comments addressed and nr_ioreq_pages() written in 
> terms of the slot size), and leaving the layout/format negotiation to 
> the ioreq_t to a later work?

You're of course okay to resubmit in whatever shape you see fit. You
may want to bring this up on e.g. a community call for wider
discussion, as apparently discussing this on-list doesn't quite get
all the input that would be needed.

> If you'd prefer patch 3 to wait until the 
> APIC ID work is done, could patches 1 and 2 go in on their own meanwhile?

I'm unsure there. Iirc they aren't very useful without the final patch.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.