Merge branches 'timers-urgent-for-linus' and 'perf-urgent-for-linus' of git://git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 5 Aug 2012 19:28:49 +0000 (22:28 +0300)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 5 Aug 2012 19:28:49 +0000 (22:28 +0300)
Pull timers and perf fixes from Ingo Molnar:
 "Timers:
 - Fix another timekeeping bug

 Pef:
   - Make clean brace expansion fix for some shells, from Palmer Cox

   - Warn user just once per guest kernel when not finding kernel info,
     from David Ahern

   - perf test fix from Jiri Olsa

   - Fix error handling on event creation in perf top, from David Ahern

   - Fix check on perf_target__strnerror, from Namhyung Kim

   - Save the whole cmdline, from David Ahern

  There's this infrastructure change:

   - Prep work for the DWARF CFI post unwinder, so that it doesn't use
     perf_session in lots of places, just evlist/evsel is enough.

  which is a late infrastructure change that prepare for future feature
  work - we wanted it upstream to simplify the fixes/development patch
  flows."

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  time: Fix adjustment cleanup bug in timekeeping_adjust()

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf tools: Remove brace expansion from clean target
  perf kvm top: Limit guest kernel info message to once
  perf tools: Introduce intlist
  perf tools: Change strlist to use the new rblist
  perf tools: Introducing rblist
  perf kvm: Use strtol for walking guestmount directory
  perf tool: Save cmdline from user in file header vs what is passed to record
  perf top: Error handling for counter creation should parallel perf-record
  perf session: Remove no longer used synthesize_sample method
  perf evsel: Adopt parse_sample method from perf_event
  perf evlist: Introduce perf_evlist__parse_sample
  perf session: Use perf_evlist__id_hdr_size more extensively
  perf session: Use perf_evlist__sample_id_all more extensively
  perf session: Use perf_evlist__sample_type more extensively
  perf evsel: Precalculate the sample size
  perf target: Fix check on buffer size
  perf symbols: Fix array sizes for binary types arrays
  perf test: Fix parse events automated tests

kernel/time/timekeeping.c

index 2988bc8191871d4bb5aed9e349634ab11c664caf..e16af197a2bc54c8f81070a1043ed1f81923679f 100644 (file)
@@ -923,20 +923,22 @@ static void timekeeping_adjust(struct timekeeper *tk, s64 offset)
                if (likely(error <= interval))
                        adj = 1;
                else
-                       adj = timekeeping_bigadjust(tk, error, &interval,
-                                                       &offset);
-       } else if (error < -interval) {
-               /* See comment above, this is just switched for the negative */
-               error >>= 2;
-               if (likely(error >= -interval)) {
-                       adj = -1;
-                       interval = -interval;
-                       offset = -offset;
-               } else
-                       adj = timekeeping_bigadjust(tk, error, &interval,
-                                                       &offset);
-       } else
-               return;
+                       adj = timekeeping_bigadjust(tk, error, &interval, &offset);
+       } else {
+               if (error < -interval) {
+                       /* See comment above, this is just switched for the negative */
+                       error >>= 2;
+                       if (likely(error >= -interval)) {
+                               adj = -1;
+                               interval = -interval;
+                               offset = -offset;
+                       } else {
+                               adj = timekeeping_bigadjust(tk, error, &interval, &offset);
+                       }
+               } else {
+                       goto out_adjust;
+               }
+       }
 
        if (unlikely(tk->clock->maxadj &&
                (tk->mult + adj > tk->clock->mult + tk->clock->maxadj))) {
@@ -999,6 +1001,7 @@ static void timekeeping_adjust(struct timekeeper *tk, s64 offset)
        tk->xtime_nsec -= offset;
        tk->ntp_error -= (interval - offset) << tk->ntp_error_shift;
 
+out_adjust:
        /*
         * It may be possible that when we entered this function, xtime_nsec
         * was very small.  Further, if we're slightly speeding the clocksource
This page took 0.026156 seconds and 5 git commands to generate.