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

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



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.

- 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.

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? 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?

Thank you.

Julian


--
Julian Vetter | Vates Hypervisor & Kernel Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech

 


Rackspace

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