|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v6 0/3] Support multiple ioreq pages
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
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |