Re: [PATCH] gpio: Switch timestamps to ktime_get_ns()
From: Bartosz Golaszewski <hidden>
Date: 2020-02-20 15:08:27
czw., 20 lut 2020 o 16:03 Linus Walleij [off-list ref] napisał(a):
The existing use of ktime_get_real_ns() in the timestamps from the GPIO events is dubious. We have had several discussions about this timestamp, and it is unclear whether userspace has ever taken into account that a timestamp from ktime_get_real_ns() can actually move backwards in time relative the previous timetamp, and userspace is more likely to expect a monotonic counter. Background: https://lore.kernel.org/linux-gpio/CAK8P3a1Skvm48sje8FNDPLYqyz9Lf8q0qX1QETWtyZTxuX4k1g@mail.gmail.com/ (local) https://marc.info/?l=linux-gpio&m=151661955709074&w=2 The change is ABI incompatible, but incompatible in a way that is IMO more likely to fix future bugs rather than break current userspace. To the best of my knowledge all userspace expects a monotonic timestamp and users are just lucky that they very seldom move backwards in time. Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Linus Walleij <redacted> ---
I too am in favor of this change. Acked-by: Bartosz Golaszewski <redacted>