[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 2/3] xen: RCU: make the period of the idle timer configurable.
>>> On 28.09.17 at 12:16, <dario.faggioli@xxxxxxxxxx> wrote: > @@ -569,6 +579,16 @@ void __init rcu_init(void) > { > void *cpu = (void *)(long)smp_processor_id(); > > + /* We don't allow 0, or anything higher than IDLE_TIMER_PERIOD_MAX */ > + if ( idle_timer_period_ms < 1 || The literal 1 here looks suspicious. How about simply refusing 0 (as well as too high values)? The also simply document the value must be non-zero in the command line doc. > + idle_timer_period_ms > IDLE_TIMER_PERIOD_MAX / MILLISECS(1) ) > + { > + printk("WARNING: rcu-idle-timer-period-ms outside of [%d,%ld]ms!\n", > + 1, IDLE_TIMER_PERIOD_MAX / MILLISECS(1)); Clearly the %d can be literal 1 if the above literal 1 was to stay. If you follow my suggestion, use "(0," instead. As to the %ld - wouldn't that rather need to be PRI_stime (due to MILLISECS() returning s_time_t)? And then, as a cosmetic thing, idle_timer_period_ms now isn't really needed outside of this function. I'd prefer if you moved it and the integer_param() into this function, to limit their scopes as much as possible. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |