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

Re: [Xen-devel] [PATCH 2/2] add thread and state info to XEN_SYSCTL_cputopoinfo



>>> On 31.08.18 at 18:22, <jgross@xxxxxxxx> wrote:
> @@ -434,15 +434,19 @@ struct xen_sysctl_lockprof_op {
>  };
>  
>  /* XEN_SYSCTL_cputopoinfo */
> +#define XEN_TOPO_STATE_OFFLINE  0
> +#define XEN_TOPO_STATE_ONLINE   1
>  #define XEN_INVALID_THREAD_ID   (~0U)
>  #define XEN_INVALID_CORE_ID     (~0U)
>  #define XEN_INVALID_SOCKET_ID   (~0U)
>  #define XEN_INVALID_NODE_ID     (~0U)
>  
>  struct xen_sysctl_cputopo {
> +    uint32_t thread;
>      uint32_t core;
>      uint32_t socket;
>      uint32_t node;
> +    uint32_t state;
>  };

Let's not burn an entire 32-bit field for this - a single bit suffices.
I'd suggest you call it flags, and use bit 0 for the online/offline
indicator. You then also don't need an "unknown" state in the
tools.

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