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

Re: [PATCH v3 1/5] xen/sched: rtds: add global-EDF utilization admission control



On 18.09.2026 11:24, Furkan Caliskan wrote:
> RTDS has no admission control: nothing stops the sum of all admitted
> units' (budget/period) reservations in a cpupool from exceeding
> what its pCPUs can actually provide. Once that happens, none of the
> EDF deadline guarantees this scheduler is built around still hold
> for the units sharing that pool.
> 
> Introduce admission control to prevent this: reject a reservation
> whenever admitting it would push a cpupool's units over its capacity.
> Track a running utilization total per cpupool, and enforce it in
> rt_alloc_udata()/rt_free_udata(), the paired lifecycle hooks for a
> unit's creation and destruction. This catches the default
> period/budget every new unit gets.
> 
> Utilization is represented as a fixed-point value: budget is
> left shifted by RTDS_UTIL_SHIFT (20 bits) and divided by period.
> A plain "(budget << RTDS_UTIL_SHIFT) / period" risks overflowing
> the multiply for large enough budgets. Rather than widen the
> arithmetic to tolerate any input, the input itself is bounded:
> rt_validate_params() rejects any budget above RTDS_MAX_BUDGET,
> chosen as the largest value that can be left-shifted by
> RTDS_UTIL_SHIFT without overflowing 64 bits, so the shift in
> rt_unit_utilization() can never overflow.
> 
> A cpupool's capacity rt_utilization_cap() scales with the number of
> scheduling resources in it. It is calculated as:
> (number of sched_resources * RTDS_UTIL_SCALE * RTDS_UTIL_CAP_PCT / 100),
> where RTDS_UTIL_CAP_PCT controls how much of that capacity can
> actually be reserved; at 100% (its current value), all of it can be.
> 
> Signed-off-by: Furkan Caliskan <frn1furkan10@xxxxxxxxx>
> Reviewed-by: Juergen Gross <jgross@xxxxxxxx>
> ---
> v3:
>  - Fixed indentation.

Looks like you re-sent only this one patch as v3. Such can be a little
confusing. We tend to call such version 2.1 or 2.5 (using this example),
to better identify that it is not a while new version of a series. Just
for possible future situations like this one.

Jan



 


Rackspace

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