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

Re: [Xen-devel] [PATCH 49/60] xen/sched: reject switching smt on/off with core scheduling active



>>> On 28.05.19 at 12:33, <jgross@xxxxxxxx> wrote:
> --- a/xen/arch/x86/sysctl.c
> +++ b/xen/arch/x86/sysctl.c
> @@ -200,7 +200,8 @@ long arch_do_sysctl(
>  
>          case XEN_SYSCTL_CPU_HOTPLUG_SMT_ENABLE:
>          case XEN_SYSCTL_CPU_HOTPLUG_SMT_DISABLE:
> -            if ( !cpu_has_htt || boot_cpu_data.x86_num_siblings < 2 )
> +            if ( !cpu_has_htt || boot_cpu_data.x86_num_siblings < 2 ||
> +                 sched_disable_smt_switching )
>              {
>                  ret = -EOPNOTSUPP;
>                  break;

I'm not convinced -EOPNOTSUPP is an appropriate error code for
this new case. -EPERM, -EACCES, or -EIO would all seem more
appropriate to me (and perhaps there are further ones).

> --- a/xen/common/schedule.c
> +++ b/xen/common/schedule.c
> @@ -57,6 +57,7 @@ integer_param("sched_ratelimit_us", sched_ratelimit_us);
>  
>  /* Number of vcpus per struct sched_unit. */
>  static unsigned int sched_granularity = 1;
> +bool sched_disable_smt_switching;

__read_mostly (perhaps also the pre-existing variable in context)?

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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