clockevents: Make minimum delay adjustments configurable
The automatic increase of the min_delta_ns of a clockevents device should be done in the clockevents code as the minimum delay is an attribute of the clockevents device. In addition not all architectures want the automatic adjustment, on a massively virtualized system it can happen that the programming of a clock event fails several times in a row because the virtual cpu has been rescheduled quickly enough. In that case the minimum delay will erroneously be increased with no way back. The new config symbol GENERIC_CLOCKEVENTS_MIN_ADJUST is used to enable the automatic adjustment. The config option is selected only for x86. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: john stultz <johnstul@us.ibm.com> Link: http://lkml.kernel.org/r/20110823133142.494157493@de.ibm.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
committed by
Thomas Gleixner
parent
29c158e81c
commit
d1748302f7
@@ -94,7 +94,7 @@ void tick_handle_periodic(struct clock_event_device *dev)
|
||||
*/
|
||||
next = ktime_add(dev->next_event, tick_period);
|
||||
for (;;) {
|
||||
if (!clockevents_program_event(dev, next, ktime_get()))
|
||||
if (!clockevents_program_event(dev, next, false))
|
||||
return;
|
||||
/*
|
||||
* Have to be careful here. If we're in oneshot mode,
|
||||
@@ -137,7 +137,7 @@ void tick_setup_periodic(struct clock_event_device *dev, int broadcast)
|
||||
clockevents_set_mode(dev, CLOCK_EVT_MODE_ONESHOT);
|
||||
|
||||
for (;;) {
|
||||
if (!clockevents_program_event(dev, next, ktime_get()))
|
||||
if (!clockevents_program_event(dev, next, false))
|
||||
return;
|
||||
next = ktime_add(next, tick_period);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user