From: Andy Lutomirski Date: Mon, 23 May 2011 13:31:27 +0000 (-0400) Subject: x86-64: Vclock_gettime(CLOCK_MONOTONIC) can't ever see nsec < 0 X-Git-Tag: v3.0-rc1~128^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f51f2852ccf0fe38a02d340d0ba625e8e32a863;p=pandora-kernel.git x86-64: Vclock_gettime(CLOCK_MONOTONIC) can't ever see nsec < 0 vclock_gettime's do_monotonic helper can't ever generate a negative nsec value, so it doesn't need to check whether it's negative. In the CLOCK_MONOTONIC_COARSE case, ns can't ever exceed 2e9-1, so we can avoid the loop entirely. This saves a single easily-predicted branch. Signed-off-by: Andy Lutomirski Cc: Andi Kleen Cc: Linus Torvalds Cc: "David S. Miller" Cc: Eric Dumazet Cc: Peter Zijlstra Cc: Borislav Petkov Link: http://lkml.kernel.org/r/%3Cd6d528d32c7a21618057cfc9005942a0fe5cb54a.1306156808.git.luto%40mit.edu%3E Signed-off-by: Thomas Gleixner --- Reading git-diff-tree failed