[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160223124915.GQ6357@twins.programming.kicks-ass.net>
Date: Tue, 23 Feb 2016 13:49:15 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Juri Lelli <juri.lelli@...il.com>,
Clark Williams <williams@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 4/4] tracing: Add __print_ns_to_secs() and
__print_ns_without_secs() helpers
On Mon, Feb 22, 2016 at 04:26:53PM -0500, Steven Rostedt wrote:
> From: "Steven Rostedt (Red Hat)" <rostedt@...dmis.org>
>
> To have nanosecond output displayed in a more human readable format, its
> nicer to convert it to a seconds format (XXX.YYYYYYYYY). The problem is that
> to do so, the numbers must be divided by NSEC_PER_SEC, and moded too. But as
> these numbers are 64 bit, this can not be done simply with '/' and '%'
> operators, but must use do_div() instead.
Would not div_[us]64_rem() make more sense? It would typically result in
just the one division, instead of two.
Powered by blists - more mailing lists