Re: [PATCH 4/5] xen/sched: rtds: make admission control cpupool-wide toggleable

Jan Beulich <[email protected]>
Newsgroups gmane.comp.emulators.xen.devel
Message-ID <[email protected]>
On 26.08.2026 06:57, Furkan Caliskan wrote:
> @@ -1691,6 +1709,33 @@ rt_dom_cntl(
>      return rc;
>  }
>  
> +#ifdef CONFIG_SYSCTL
> +static int cf_check
> +rt_sys_cntl(const struct scheduler *ops,
> +             struct xen_sysctl_scheduler_op *sc)
> +{
> +    struct xen_sysctl_rtds_schedule *params = &sc->u.sched_rtds;
> +    struct rt_private *prv = rt_priv(ops);
> +    unsigned long flags;
> +
> +    switch ( sc->cmd )
> +    {
> +    case XEN_SYSCTL_SCHEDOP_putinfo:
> +        spin_lock_irqsave(&prv->lock, flags);
> +        prv->admission_control_enabled = params->admission_control_enabled;
> +        spin_unlock_irqrestore(&prv->lock, flags);
> +        break;
> +    case XEN_SYSCTL_SCHEDOP_getinfo:
> +        spin_lock_irqsave(&prv->lock, flags);
> +        params->admission_control_enabled = prv->admission_control_enabled;
> +        spin_unlock_irqrestore(&prv->lock, flags);
> +        break;
> +    }

Blank line please between non-fall-through case blocks.

> --- a/xen/include/public/sysctl.h
> +++ b/xen/include/public/sysctl.h
> @@ -814,6 +814,10 @@ struct xen_sysctl_credit2_schedule {
>      uint32_t ratelimit_us;
>  };
>  
> +struct xen_sysctl_rtds_schedule {
> +    bool admission_control_enabled;
> +};

In the public headers only fixed-width types may be used. The width of
bool is ABI-dependent (no matter that it's exceedingly unlikely to ever
be other than the same size as char).

Jan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.