30 Sep, 2006

1 commit

  • The clock_nanosleep() function does not return the time remaining when the
    sleep is interrupted by a signal.

    This patch creates a new call out, compat_clock_nanosleep_restart(), which
    handles returning the remaining time after a sleep is interrupted. This
    patch revives clock_nanosleep_restart(). It is now accessed via the new
    call out. The compat_clock_nanosleep_restart() is used for compatibility
    access.

    Since this is implemented in compatibility mode the normal path is
    virtually unaffected - no real performance impact.

    Signed-off-by: Toyo Abe
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Roland McGrath
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Toyo Abe
     

15 Aug, 2006

1 commit


01 Aug, 2006

1 commit

  • Few of the callback functions and notifier blocks that are associated with cpu
    notifications incorrectly have __devinit and __devinitdata. They should be
    __cpuinit and __cpuinitdata instead.

    It makes no functional difference but wastes text area when CONFIG_HOTPLUG is
    enabled and CONFIG_HOTPLUG_CPU is not.

    This patch fixes all those instances.

    Signed-off-by: Chandra Seetharaman
    Cc: Ashok Raj
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chandra Seetharaman
     

04 Jul, 2006

2 commits


28 Jun, 2006

2 commits

  • This patch reverts notifier_block changes made in 2.6.17

    Signed-off-by: Chandra Seetharaman
    Cc: Ashok Raj
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chandra Seetharaman
     
  • In 2.6.17, there was a problem with cpu_notifiers and XFS. I provided a
    band-aid solution to solve that problem. In the process, i undid all the
    changes you both were making to ensure that these notifiers were available
    only at init time (unless CONFIG_HOTPLUG_CPU is defined).

    We deferred the real fix to 2.6.18. Here is a set of patches that fixes the
    XFS problem cleanly and makes the cpu notifiers available only at init time
    (unless CONFIG_HOTPLUG_CPU is defined).

    If CONFIG_HOTPLUG_CPU is defined then cpu notifiers are available at run
    time.

    This patch reverts the notifier_call changes made in 2.6.17

    Signed-off-by: Chandra Seetharaman
    Cc: Ashok Raj
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chandra Seetharaman
     

26 Jun, 2006

2 commits

  • Fix kernel-doc formatting in ktime.h and hrtimer.[ch] files.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • There are several instances of per_cpu(foo, raw_smp_processor_id()), which
    is semantically equivalent to __get_cpu_var(foo) but without the warning
    that smp_processor_id() can give if CONFIG_DEBUG_PREEMPT is enabled. For
    those architectures with optimized per-cpu implementations, namely ia64,
    powerpc, s390, sparc64 and x86_64, per_cpu() turns into more and slower
    code than __get_cpu_var(), so it would be preferable to use __get_cpu_var
    on those platforms.

    This defines a __raw_get_cpu_var(x) macro which turns into per_cpu(x,
    raw_smp_processor_id()) on architectures that use the generic per-cpu
    implementation, and turns into __get_cpu_var(x) on the architectures that
    have an optimized per-cpu implementation.

    Signed-off-by: Paul Mackerras
    Acked-by: David S. Miller
    Acked-by: Ingo Molnar
    Acked-by: Martin Schwidefsky
    Cc: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Mackerras
     

21 Jun, 2006

1 commit

  • * git://git.infradead.org/~dwmw2/rbtree-2.6:
    [RBTREE] Switch rb_colour() et al to en_US spelling of 'color' for consistency
    Update UML kernel/physmem.c to use rb_parent() accessor macro
    [RBTREE] Update hrtimers to use rb_parent() accessor macro.
    [RBTREE] Add explicit alignment to sizeof(long) for struct rb_node.
    [RBTREE] Merge colour and parent fields of struct rb_node.
    [RBTREE] Remove dead code in rb_erase()
    [RBTREE] Update JFFS2 to use rb_parent() accessor macro.
    [RBTREE] Update eventpoll.c to use rb_parent() accessor macro.
    [RBTREE] Update key.c to use rb_parent() accessor macro.
    [RBTREE] Update ext3 to use rb_parent() accessor macro.
    [RBTREE] Change rbtree off-tree marking in I/O schedulers.
    [RBTREE] Add accessor macros for colour and parent fields of rb_node

    Linus Torvalds
     

01 Jun, 2006

1 commit

  • From: Stephen Hemminger

    I want to use the hrtimer's in the netem (Network Emulator) qdisc. But the
    necessary symbols aren't exported for module use.

    Also needed by SystemTap.

    Signed-off-by: Stephen Hemminger
    Acked-by: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "Stone, Joshua I"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Hemminger
     

26 Apr, 2006

2 commits

  • Few of the notifier_chain_register() callers use __init in the definition
    of notifier_call. It is incorrect as the function definition should be
    available after the initializations (they do not unregister them during
    initializations).

    This patch fixes all such usages to _not_ have the notifier_call __init
    section.

    Signed-off-by: Chandra Seetharaman
    Signed-off-by: Linus Torvalds

    Chandra Seetharaman
     
  • Few of the notifier_chain_register() callers use __devinitdata in the
    definition of notifier_block data structure. It is incorrect as the
    data structure should be available after the initializations (they do
    not unregister them during initializations).

    This was leading to an oops when notifier_chain_register() call is
    invoked for those callback chains after initialization.

    This patch fixes all such usages to _not_ have the notifier_block data
    structure in the init data section.

    Signed-off-by: Chandra Seetharaman
    Signed-off-by: Linus Torvalds

    Chandra Seetharaman
     

22 Apr, 2006

1 commit


11 Apr, 2006

1 commit


01 Apr, 2006

3 commits


27 Mar, 2006

6 commits

  • The nanosleep cleanup allows to remove the data field of hrtimer. The
    callback function can use container_of() to get it's own data. Since the
    hrtimer structure is anyway embedded in other structures, this adds no
    overhead.

    Signed-off-by: Roman Zippel
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • nsec_t predates ktime_t and has mostly been superseded by it. In the few
    places that are left it's better to make it explicit that we're dealing with
    64 bit values here.

    Signed-off-by: Roman Zippel
    Acked-by: Thomas Gleixner
    Acked-by: John Stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Remove the state field and encode this information in the rb_node similiar to
    normal timer.

    Signed-off-by: Roman Zippel
    Acked-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • nanosleep is the only user of the expired state, so let it manage this itself,
    which makes the hrtimer code a bit simpler. The remaining time is also only
    calculated if requested.

    Signed-off-by: Roman Zippel
    Acked-by: Ingo Molnar
    Acked-by: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • Pass current time to hrtimer_forward(). This allows to use the softirq time
    in the timer base when the forward function is called from the timer callback.
    Other places pass current time with a call to timer->base->get_time().

    Signed-off-by: Roman Zippel
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • The hrtimer softirq is called from the timer softirq every tick. Retrieve the
    current time from xtime and wall_to_monotonic instead of calling
    base->get_time() for each timer base. Store the time in the base structure
    and provide a hook once clock source abstractions are in place and to keep the
    code open for new base clocks.

    Based on a patch from: Roman Zippel

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     

07 Mar, 2006

1 commit

  • Also from Thomas Gleixner

    Function next_timer_interrupt() got broken with a recent patch
    6ba1b91213e81aa92b5cf7539f7d2a94ff54947c as sys_nanosleep() was moved to
    hrtimer. This broke things as next_timer_interrupt() did not check hrtimer
    tree for next event.

    Function next_timer_interrupt() is needed with dyntick (CONFIG_NO_IDLE_HZ,
    VST) implementations, as the system can be in idle when next hrtimer event
    was supposed to happen. At least ARM and S390 currently use
    next_timer_interrupt().

    Signed-off-by: Thomas Gleixner
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tony Lindgren
     

15 Feb, 2006

1 commit

  • CONFIG_TIME_LOW_RES is a temporary way for architectures to signal that
    they simply return xtime in do_gettimeoffset(). In this corner-case we
    want to round up by resolution when starting a relative timer, to avoid
    short timeouts. This will go away with the GTOD framework.

    Signed-off-by: Ingo Molnar
    Cc: Roman Zippel
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     

02 Feb, 2006

3 commits

  • At some point we added credits to people who actively helped to bring
    k/hr-timers along. This was lost in the big code revamp. Add it back.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • Clean up the interface to hrtimers by changing the init code to pass the mode
    as well as the clock. This allow the init code to select the correct base and
    eliminates extra timer re-init code in posix-timers. We also simplify the
    restart interface nanosleep use.

    Signed-off-by: George Anzinger
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    George Anzinger
     
  • From: Steven Rostedtrostedt@goodmis.org

    CPU0 expires a posix-timer and runs the callback function. The signal is
    queued.

    After releasing the posix-timer lock and before returning to hrtimer_run_queue
    CPU0 gets interrupted. CPU1 delivers the queued signal and rearms the timer.
    CPU0 comes back to hrtimer_run_queue and sets the timer state to expired.

    The next modification of the timer can result in an oops, because the state
    information is wrong.

    Keep track of state = RUNNING and check if the state has been in the return
    path of hrtimer_run_queue. In case the state has been changed, ignore a
    restart request and do not touch the state variable.

    Signed-off-by: Steven Rostedt
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    akpm@osdl.org
     

17 Jan, 2006

2 commits

  • fix the following sparse warning:

    kernel/hrtimer.c:665:34: warning: incorrect type in argument 2 (different address spaces)
    kernel/hrtimer.c:665:34: expected void const *from
    kernel/hrtimer.c:665:34: got struct timespec [noderef] *
    kernel/hrtimer.c:664:2: warning: dereference of noderef expression

    Signed-off-by: Ingo Molnar
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • Fix a comment which missed an update cycle somewhere.

    Signed-off-by: Jonathan Corbet
    Signed-off-by: Linus Torvalds

    Jonathan Corbet
     

12 Jan, 2006

3 commits


11 Jan, 2006

4 commits

  • This series removes the getnstimestamp() function from kernel/time.c in favor
    of kernel/hrtimer.c's ktime_get_ts() function which currently does exactly the
    same thing: retrieves a high-resolution (ns) timespec structure and performs
    the wall_to_monotonic adjustment.

    This patch:

    Export ktime_get_ts() to be used as a timestamp function since it uses
    getnstimefoday() and does the wall_to_monotonic adjustment.

    Signed-off-by: Matt Helsley
    Cc: john stultz
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matt Helsley
     
  • convert sys_nanosleep() to use hrtimer_nanosleep()

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • introduce the hrtimer_nanosleep() and hrtimer_nanosleep_real() APIs. Not yet
    used by any code.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • hrtimer subsystem core. It is initialized at bootup and expired by the timer
    interrupt, but is otherwise not utilized by any other subsystem yet.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner