Re: [PATCH v4] trace: Use 64-bit timekeeping

From: Steven Rostedt
Date: Wed Jan 28 2015 - 16:27:41 EST


On Wed, 28 Jan 2015 19:46:11 +0530
Tina Ruchandani <ruchandani.tina@xxxxxxxxx> wrote:

> The ring_buffer_producer uses 'struct timeval' to measure
> its start and end times. 'struct timeval' on 32-bit systems
> will have its tv_sec value overflow in year 2038 and beyond.
> This patch replaces struct timeval with 'ktime_t' which uses
> 64-bit representation for nanoseconds.
>
> Suggested-by: Arnd Bergmann <arnd@xxxxxxxx>
> Suggested-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
> Signed-off-by: Tina Ruchandani <ruchandani.tina@xxxxxxxxx>
> ---
> Changes in v4:
> - Fix typo in commit message.
> - Avoid typecast to 'long long' by defining RUN_TIME as '10ULL'
> instead of '10'.

Although I have not tested this, this patch looks fine to me. Is this
going to go through some cleanup tree or should I just pull it?

-- Steve


> Changes in v3:
> - Use a more efficient way to compute condition for exiting loop.
> - Fix variable naming - all caps is only for macros.
> Changes in v2:
> - Use ktime_t instead of timespec64 for efficiency reasons.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/