On 06.08.2025 14:01, Oleksii Kurochko wrote: > > On 8/5/25 12:40 PM, Jan Beulich wrote: >> On 31.07.2025 17:58, Oleksii Kurochko wrote: >>> @@ -30,3 +34,18 @@ int p2m_init(struct domain *d) >>> >>> return 0; >>> } >>> + >>> +/* >>> + * Set the pool of pages to the required number of pages. >>> + * Returns 0 for success, non-zero for failure. >>> + * Call with d->arch.paging.lock held. >>> + */ >>> +int p2m_set_allocation(struct domain *d, unsigned long pages, bool >>> *preempted) >> Noticed only when looking at the subsequent patch: With this being ... >> >>> +{ >>> + int rc; >>> + >>> + if ( (rc = paging_freelist_init(d, pages, preempted)) ) >> ... a caller of this function, the "init" in the name feels wrong. > > I thought about paging_freelist_alloc(), but it feels wrong too as it sounds > like > freelist is being allocated inside this functions, but what really happens > that > pages are allocated and just added/removed to/from freelist. > > Maybe something like paging_freelist_resize() or *_adjust() would be better?
Yes; whichever of the two you like better. Jan