1. 06 Feb, 2008 2 commits
  2. 01 Feb, 2008 1 commit
  3. 18 Oct, 2007 2 commits
  4. 17 Oct, 2007 1 commit
  5. 16 Oct, 2007 1 commit
    • Ingo Molnar's avatar
      time: introduce xtime_seconds · f20bf612
      Ingo Molnar authored
      
      improve performance of sys_time(). sys_time() returns time in seconds,
      but it does so by calling do_gettimeofday() and then returning the
      tv_sec portion of the GTOD time. But the data structure "xtime", which
      is updated by every timer/scheduler tick, already offers HZ granularity
      time.
      
      the patch improves the sysbench oltp macrobenchmark by 4-5% on an AMD
      dual-core system:
      
      v2.6.23:
      
      #threads
      
         1:     transactions:                        4073   (407.23 per sec.)
         2:     transactions:                        8530   (852.81 per sec.)
         3:     transactions:                        8321   (831.88 per sec.)
         4:     transactions:                        8407   (840.58 per sec.)
         5:     transactions:                        8070   (806.74 per sec.)
      
      v2.6.23 + sys_time-speedup.patch:
      
         1:     transactions:                        4281   (428.09 per sec.)
         2:     transactions:                        8910   (890.85 per sec.)
         3:     transactions:                        8659   (865.79 per sec.)
         4:     transactions:                        8676   (867.34 per sec.)
         5:     transactions:                        8532   (852.91 per sec.)
      
      and by 4-5% on an Intel dual-core system too:
      
      2.6.23:
      
        1:     transactions:                        4560   (455.94 per sec.)
        2:     transactions:                        10094  (1009.30 per sec.)
        3:     transactions:                        9755   (975.36 per sec.)
        4:     transactions:                        9859   (985.78 per sec.)
        5:     transactions:                        9701   (969.72 per sec.)
      
      2.6.23 + sys_time-speedup.patch:
      
        1:     transactions:                        4779   (477.84 per sec.)
        2:     transactions:                        10103  (1010.14 per sec.)
        3:     transactions:                        10141  (1013.93 per sec.)
        4:     transactions:                        10371  (1036.89 per sec.)
        5:     transactions:                        10178  (1017.50 per sec.)
      
      (the more CPUs the system has, the more speedup this patch gives for
      this particular workload.)
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f20bf612
  6. 25 Jul, 2007 1 commit
    • john stultz's avatar
      Cleanup non-arch xtime uses, use get_seconds() or current_kernel_time(). · 2c6b47de
      john stultz authored
      
      This avoids use of the kernel-internal "xtime" variable directly outside
      of the actual time-related functions.  Instead, use the helper functions
      that we already have available to us.
      
      This doesn't actually change any behaviour, but this will allow us to
      fix the fact that "xtime" isn't updated very often with CONFIG_NO_HZ
      (because much of the realtime information is maintained as separate
      offsets to 'xtime'), which has caused interfaces that use xtime directly
      to get a time that is out of sync with the real-time clock by up to a
      third of a second or so.
      Signed-off-by: default avatarJohn Stultz <johnstul@us.ibm.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2c6b47de
  7. 20 Jul, 2007 2 commits
    • Linus Torvalds's avatar
      Revert "sys_time() speedup" · 20082208
      Linus Torvalds authored
      This basically reverts commit 4e44f349
      
      ,
      while waiting for it to be re-done more completely.  There are cases of
      people mixing "time()" with higher-resolution time sources, and we need
      to take the nanosecond offsets into account.
      
      Ingo has a patch that does that, but it's still under some discussion.
      In the meantime, just revert back to the old simple situation of just
      doing the whole exact timesource calculations.
      
      But rather than using do_gettimeofday(), use the internal nanosecond
      resolution getnstimeofday(), which at least avoids one unnecessary
      conversion (since we really don't care about whether the fractional
      seconds are nanoseconds or microseconds - we'll just throw them away).
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      20082208
    • Bob Picco's avatar
      [IA64] remove time interpolator · 1f564ad6
      Bob Picco authored
      
      Remove time_interpolator code (This is generic code, but
      only user was ia64.  It has been superseded by the
      CONFIG_GENERIC_TIME code).
      Signed-off-by: default avatarBob Picco <bob.picco@hp.com>
      Signed-off-by: default avatarJohn Stultz <johnstul@us.ibm.com>
      Signed-off-by: default avatarPeter Keilty <peter.keilty@hp.com>
      Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
      1f564ad6
  8. 16 Jul, 2007 1 commit
    • Ingo Molnar's avatar
      sys_time() speedup · 4e44f349
      Ingo Molnar authored
      
      Improve performance of sys_time().  sys_time() returns time in seconds, but
      it does so by calling do_gettimeofday() and then returning the tv_sec
      portion of the GTOD time.  But the data structure "xtime", which is updated
      by every timer/scheduler tick, already offers HZ granularity time.
      
      The patch improves the sysbench OLTP macrobenchmark significantly:
      
      2.6.22-rc6:
      
      #threads
         1:        transactions:                        3733   (373.21 per sec.)
         2:        transactions:                        6676   (667.46 per sec.)
         3:        transactions:                        6957   (695.50 per sec.)
         4:        transactions:                        7055   (705.48 per sec.)
         5:        transactions:                        6596   (659.33 per sec.)
      
      2.6.22-rc6 + sys_time.patch:
      
         1:        transactions:                        4005   (400.47 per sec.)
         2:        transactions:                        7379   (737.77 per sec.)
         3:        transactions:                        7347   (734.49 per sec.)
         4:        transactions:                        7468   (746.65 per sec.)
         5:        transactions:                        7428   (742.47 per sec.)
      
      Mixed API uses of gettimeofday() and time() are guaranteed to be coherent
      via the use of a at-most-once-per-second slowpath that updates xtime.
      
      [akpm@linux-foundation.org: build fixes]
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: John Stultz <johnstul@us.ibm.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4e44f349
  9. 08 May, 2007 2 commits
  10. 26 Apr, 2007 2 commits
    • Stephen Hemminger's avatar
      [TCP] tcp_probe: improvements for net-2.6.22 · 85795d64
      Stephen Hemminger authored
      
      Change tcp_probe to use ktime (needed to add one export).
      Add option to only get events when cwnd changes - from Doug Leith
      Signed-off-by: default avatarStephen Hemminger <shemminger@linux-foundation.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      85795d64
    • Eric Dumazet's avatar
      [NET]: convert network timestamps to ktime_t · b7aa0bf7
      Eric Dumazet authored
      
      We currently use a special structure (struct skb_timeval) and plain
      'struct timeval' to store packet timestamps in sk_buffs and struct
      sock.
      
      This has some drawbacks :
      - Fixed resolution of micro second.
      - Waste of space on 64bit platforms where sizeof(struct timeval)=16
      
      I suggest using ktime_t that is a nice abstraction of high resolution
      time services, currently capable of nanosecond resolution.
      
      As sizeof(ktime_t) is 8 bytes, using ktime_t in 'struct sock' permits
      a 8 byte shrink of this structure on 64bit architectures. Some other
      structures also benefit from this size reduction (struct ipq in
      ipv4/ip_fragment.c, struct frag_queue in ipv6/reassembly.c, ...)
      
      Once this ktime infrastructure adopted, we can more easily provide
      nanosecond resolution on top of it. (ioctl SIOCGSTAMPNS and/or
      SO_TIMESTAMPNS/SCM_TIMESTAMPNS)
      
      Note : this patch includes a bug correction in
      compat_sock_get_timestamp() where a "err = 0;" was missing (so this
      syscall returned -ENOENT instead of 0)
      Signed-off-by: default avatarEric Dumazet <dada1@cosmosbay.com>
      CC: Stephen Hemminger <shemminger@linux-foundation.org>
      CC: John find <linux.kernel@free.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b7aa0bf7
  11. 04 Apr, 2007 1 commit
  12. 16 Feb, 2007 2 commits
  13. 01 Oct, 2006 1 commit
  14. 26 Jun, 2006 1 commit
  15. 31 Mar, 2006 1 commit
    • Kalin KOZHUHAROV's avatar
      Fix comments: s/granuality/granularity/ · 8ba8e95e
      Kalin KOZHUHAROV authored
      
      I was grepping through the code and some `grep ganularity -R .` didn't
      catch what I thought. Then looking closer I saw the term "granuality"
      used in only four places (in comments) and granularity in many more
      places describing the same idea. Some other facts:
      
      dictionary.com does not know such a word
      define:granuality on google is not found (and pages for granuality are
      mostly related to patches to the kernel)
      it has not been discussed as a term on LKML, AFAICS (=Can Search)
      
      To be consistent, I think granularity should be used everywhere.
      Signed-off-by: default avatarKalin KOZHUHAROV <kalin@thinrope.net>
      Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
      8ba8e95e
  16. 26 Mar, 2006 1 commit
  17. 25 Mar, 2006 1 commit
  18. 03 Feb, 2006 1 commit
  19. 31 Jan, 2006 1 commit
  20. 11 Jan, 2006 1 commit
  21. 10 Jan, 2006 6 commits
  22. 12 Dec, 2005 1 commit
    • Matt Helsley's avatar
      [PATCH] Add getnstimestamp function · 64123fd4
      Matt Helsley authored
      
      There are several functions that might seem appropriate for a timestamp:
      
      get_cycles()
      current_kernel_time()
      do_gettimeofday()
      <read jiffies/jiffies_64>
      
      Each has problems with combinations of SMP-safety, low resolution, and
      monotonicity. This patch adds a new function that returns a monotonic SMP-safe
      timestamp with nanosecond resolution where available.
      
      Changes:
      	Split timestamp into separate patch
      	Moved to kernel/time.c
      	Renamed to getnstimestamp
      	Fixed unintended-pointer-arithmetic bug
      Signed-off-by: default avatarMatt Helsley <matthltc@us.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      64123fd4
  23. 30 Oct, 2005 1 commit
    • john stultz's avatar
      [PATCH] NTP shift_right cleanup · 1bb34a41
      john stultz authored
      
      Create a macro shift_right() that avoids the numerous ugly conditionals in the
      NTP code that look like:
      
              if(a < 0)
                      b = -(-a >> shift);
              else
                      b = a >> shift;
      
      Replacing it with:
      
              b = shift_right(a, shift);
      
      This should have zero effect on the logic, however it should probably have
      a bit of testing just to be sure.
      
      Also replace open-coded min/max with the macros.
      
      Signed-off-by : John Stultz <johnstul@us.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      1bb34a41
  24. 29 Oct, 2005 1 commit
  25. 14 Oct, 2005 1 commit
  26. 27 Jul, 2005 1 commit
  27. 28 Apr, 2005 1 commit
    • Christoph Lameter's avatar
      [PATCH] time interpolator: Fix settimeofday inaccuracy · 9acf6597
      Christoph Lameter authored
      
      settimeofday will set the time a little bit too early on systems using
      time interpolation since it subtracts the current interpolator offset
      from the time. This used to be necessary with the code in 2.6.9 and earlier
      but the new code resets the time interpolator after setting the time.
      Thus the time is set too early and gettimeofday will return a time slightly
      before the time specified with settimeofday if invoked immeditely after
      settimeofday.
      
      This removes the obsolete subtraction of the time interpolator offset
      and makes settimeofday set the time accurately. 
      Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      9acf6597
  28. 16 Apr, 2005 1 commit
    • Linus Torvalds's avatar
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds authored
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4