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

Re: [Xen-devel] [PATCH 6/6] x86/smt: Don't use -EBUSY for smt_up_down_helper() continuations



On 05.12.2019 23:30, Andrew Cooper wrote:
> --- a/xen/arch/x86/sysctl.c
> +++ b/xen/arch/x86/sysctl.c
> @@ -85,6 +85,9 @@ long cpu_up_helper(void *data)
>          /* On EBUSY, flush RCU work and have one more go. */
>          rcu_barrier();
>          ret = cpu_up(cpu);
> +
> +        if ( ret == -EBUSY )
> +            ret = -ERESTART;
>      }
>  
>      if ( !ret && !opt_smt &&
> @@ -110,6 +113,9 @@ long cpu_down_helper(void *data)
>          /* On EBUSY, flush RCU work and have one more go. */
>          rcu_barrier();
>          ret = cpu_down(cpu);
> +
> +        if ( ret == -EBUSY )
> +            ret = -ERESTART;
>      }
>      return ret;
>  }

For both of these - if two successive attempts didn't work, is
there really much point not reporting the fact back to the
caller? You're liable to request continuations indefinitely then.

> @@ -143,8 +149,7 @@ static long smt_up_down_helper(void *data)
>           */
>          if ( ret != -EEXIST && general_preempt_check() )
>          {
> -            /* In tasklet context - can't create a contination. */
> -            ret = -EBUSY;
> +            ret = -ERESTART;
>              break;
>          }
>  

I agree with this change.

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®.