[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 04/17] xen/cpupool: switch cpupool id to unsigned
On 07.12.2020 15:48, Jürgen Groß wrote: > On 07.12.20 10:59, Jan Beulich wrote: >> On 01.12.2020 10:01, Jürgen Groß wrote: >>> On 01.12.20 09:55, Jan Beulich wrote: >>>> On 01.12.2020 09:21, Juergen Gross wrote: >>>>> --- a/xen/common/sched/private.h >>>>> +++ b/xen/common/sched/private.h >>>>> @@ -505,8 +505,8 @@ static inline void sched_unit_unpause(const struct >>>>> sched_unit *unit) >>>>> >>>>> struct cpupool >>>>> { >>>>> - int cpupool_id; >>>>> -#define CPUPOOLID_NONE (-1) >>>>> + unsigned int cpupool_id; >>>>> +#define CPUPOOLID_NONE (~0U) >>>> >>>> How about using XEN_SYSCTL_CPUPOOL_PAR_ANY here? Furthermore, >>>> together with the remark above, I think you also want to consider >>>> the case of sizeof(unsigned int) > sizeof(uint32_t). >>> >>> With patch 5 this should be completely fine. >> >> I don't think so, as there still will be CPUPOOLID_NONE != >> XEN_SYSCTL_CPUPOOL_PAR_ANY in the mentioned case. > > I don't see that being relevant, as we have in cpupool_do_sysctl(): > > poolid = (op->cpupool_id == XEN_SYSCTL_CPUPOOL_PAR_ANY) ? > CPUPOOLID_NONE: op->cpupool_id; Oh, sorry for the noise then. I forgot about this transformation. Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |