[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3] sched: print information about scheduling granularity
On 22.04.2020 11:30, Sergey Dyasli wrote: > --- a/xen/common/sched/cpupool.c > +++ b/xen/common/sched/cpupool.c > @@ -40,19 +40,50 @@ static DEFINE_SPINLOCK(cpupool_lock); > static enum sched_gran __read_mostly opt_sched_granularity = SCHED_GRAN_cpu; > static unsigned int __read_mostly sched_granularity = 1; > > +struct sched_gran_name { > + enum sched_gran mode; > + const char *name; > +}; > + > +static const struct sched_gran_name sg_name[] = { > + {SCHED_GRAN_cpu, "cpu"}, > + {SCHED_GRAN_core, "core"}, > + {SCHED_GRAN_socket, "socket"}, > +}; Personally I think that in cases like this one it is more (space) efficient to use char[8] or so for the second struct member. Jan
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |