diff options
author | Johannes Berg <johannes.berg@intel.com> | 2020-12-04 12:34:34 +0100 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2020-12-13 22:38:06 +0100 |
commit | 58b09f68697066dfde948153c82dd5d85e10f127 (patch) | |
tree | ab41f419aeb6a9dbedc2d515173e412b69804f69 /arch/um/kernel/time.c | |
parent | 3c6ac61bc91ea39031f020c973a91db0aee10fde (diff) |
um: time-travel: avoid multiple identical propagations
If there is some kind of interrupt negotation or such then
it may happen that we send an update message multiple times,
avoid that in the interest of efficiency by storing the last
transmitted value and only sending a new update if it's not
the same as the last update.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/kernel/time.c')
-rw-r--r-- | arch/um/kernel/time.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c index 80d33735cfd2..204ddb141b01 100644 --- a/arch/um/kernel/time.c +++ b/arch/um/kernel/time.c @@ -190,7 +190,13 @@ static void time_travel_ext_update_request(unsigned long long time) void __time_travel_propagate_time(void) { + static unsigned long long last_propagated; + + if (last_propagated == time_travel_time) + return; + time_travel_ext_req(UM_TIMETRAVEL_UPDATE, time_travel_time); + last_propagated = time_travel_time; } EXPORT_SYMBOL_GPL(__time_travel_propagate_time); |