12 Feb, 2011

1 commit


11 Dec, 2010

1 commit


10 May, 2010

1 commit

  • For the ondemand cpufreq governor, it is desired that the iowait
    time is microaccounted in a similar way as idle time is.

    This patch introduces the infrastructure to account and expose
    this information via the get_cpu_iowait_time_us() function.

    [akpm@linux-foundation.org: fix CONFIG_NO_HZ=n build]
    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Reviewed-by: Rik van Riel
    Acked-by: Peter Zijlstra
    Cc: davej@redhat.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Arjan van de Ven
     

13 Mar, 2010

1 commit

  • The current logic which handles clock events programming failures can
    increase min_delta_ns unlimited and even can cause overflows.

    Sanitize it by:
    - prevent zero increase when min_delta_ns == 1
    - limiting min_delta_ns to a jiffie
    - bail out if the jiffie limit is hit
    - add retries stats for /proc/timer_list so we can gather data

    Reported-by: Uwe Kleine-Koenig
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     

17 Dec, 2009

1 commit


15 Dec, 2009

1 commit


10 Dec, 2009

1 commit

  • The hrtimer_interrupt hang logic adjusts min_delta_ns based on the
    execution time of the hrtimer callbacks.

    This is error-prone for virtual machines, where a guest vcpu can be
    scheduled out during the execution of the callbacks (and the callbacks
    themselves can do operations that translate to blocking operations in
    the hypervisor), which in can lead to large min_delta_ns rendering the
    system unusable.

    Replace the current heuristics with something more reliable. Allow the
    interrupt code to try 3 times to catch up with the lost time. If that
    fails use the total time spent in the interrupt handler to defer the
    next timer interrupt so the system can catch up with other things
    which got delayed. Limit that deferment to 100ms.

    The retry events and the maximum time spent in the interrupt handler
    are recorded and exposed via /proc/timer_list

    Inspired by a patch from Marcelo.

    Reported-by: Michael Tokarev
    Signed-off-by: Thomas Gleixner
    Tested-by: Marcelo Tosatti
    Cc: kvm@vger.kernel.org

    Thomas Gleixner
     

14 Nov, 2009

2 commits

  • In the dynamic tick code, "max_delta_ns" (member of the
    "clock_event_device" structure) represents the maximum sleep time
    that can occur between timer events in nanoseconds.

    The variable, "max_delta_ns", is defined as an unsigned long
    which is a 32-bit integer for 32-bit machines and a 64-bit
    integer for 64-bit machines (if -m64 option is used for gcc).
    The value of max_delta_ns is set by calling the function
    "clockevent_delta2ns()" which returns a maximum value of LONG_MAX.
    For a 32-bit machine LONG_MAX is equal to 0x7fffffff and in
    nanoseconds this equates to ~2.15 seconds. Hence, the maximum
    sleep time for a 32-bit machine is ~2.15 seconds, where as for
    a 64-bit machine it will be many years.

    This patch changes the type of max_delta_ns to be "u64" instead of
    "unsigned long" so that this variable is a 64-bit type for both 32-bit
    and 64-bit machines. It also changes the maximum value returned by
    clockevent_delta2ns() to KTIME_MAX. Hence this allows a 32-bit
    machine to sleep for longer than ~2.15 seconds. Please note that this
    patch also changes "min_delta_ns" to be "u64" too and although this is
    unnecessary, it makes the patch simpler as it avoids to fixup all
    callers of clockevent_delta2ns().

    [ tglx: changed "unsigned long long" to u64 as we use this data type
    through out the time code ]

    Signed-off-by: Jon Hunter
    Cc: John Stultz
    LKML-Reference:
    Signed-off-by: Thomas Gleixner

    Jon Hunter
     
  • The mult and shift factors of clock events differ in their data type
    from those of clock sources for no reason. u32 is sufficient for
    both. shift is always
    Tested-by: Mikael Pettersson
    Acked-by: Ralf Baechle
    Acked-by: Linus Walleij
    Cc: John Stultz
    LKML-Reference:

    Thomas Gleixner
     

02 Oct, 2009

1 commit


17 Aug, 2009

1 commit

  • /proc/timer_list and /proc/slabinfo are not supposed to be
    written, so there should be no write permissions on it.

    Signed-off-by: WANG Cong
    Cc: Pekka Enberg
    Cc: Vegard Nossum
    Cc: Eduard - Gabriel Munteanu
    Cc: linux-mm@kvack.org
    Cc: Christoph Lameter
    Cc: David Rientjes
    Cc: Amerigo Wang
    Cc: Matt Mackall
    Cc: Arjan van de Ven
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Amerigo Wang
     

22 Oct, 2008

1 commit


20 Oct, 2008

3 commits


08 Sep, 2008

1 commit


06 Sep, 2008

1 commit


29 Apr, 2008

1 commit


18 Feb, 2008

1 commit


02 Feb, 2008

1 commit

  • To allow better diagnosis of tick-sched related, especially NOHZ
    related problems, we need to know when the last wakeup via an irq
    happened and when the CPU left the idle state.

    Add two fields (idle_waketime, idle_exittime) to the tick_sched
    structure and add them to the timer_list output.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     

29 Oct, 2007

1 commit


01 Aug, 2007

1 commit


18 Jul, 2007

1 commit

  • KSYM_NAME_LEN is peculiar in that it does not include the space for the
    trailing '\0', forcing all users to use KSYM_NAME_LEN + 1 when allocating
    buffer. This is nonsense and error-prone. Moreover, when the caller
    forgets that it's very likely to subtly bite back by corrupting the stack
    because the last position of the buffer is always cleared to zero.

    This patch increments KSYM_NAME_LEN by one and updates code accordingly.

    * off-by-one bug in asm-powerpc/kprobes.h::kprobe_lookup_name() macro
    is fixed.

    * Where MODULE_NAME_LEN and KSYM_NAME_LEN were used together,
    MODULE_NAME_LEN was treated as if it didn't include space for the
    trailing '\0'. Fix it.

    Signed-off-by: Tejun Heo
    Acked-by: Paulo Marques
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     

10 May, 2007

1 commit

  • u64 and s64 are not necessarily 'long long' on some 64-bit
    platforms, so explicit the type to kill the compiler warnings.

    Also consistently use '%Lu' which is unsigned.

    Signed-off-by: David S. Miller
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Miller
     

09 May, 2007

2 commits

  • kallsyms_lookup() can go iterating over modules list unprotected which is OK
    for emergency situations (oops), but not OK for regular stuff like
    /proc/*/wchan.

    Introduce lookup_symbol_name()/lookup_module_symbol_name() which copy symbol
    name into caller-supplied buffer or return -ERANGE. All copying is done with
    module_mutex held, so...

    Signed-off-by: Alexey Dobriyan
    Cc: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Several kallsyms_lookup() pass dummy arguments but only need, say, module's
    name. Make kallsyms_lookup() accept NULLs where possible.

    Also, makes picture clearer about what interfaces are needed for all symbol
    resolving business.

    Signed-off-by: Alexey Dobriyan
    Cc: Rusty Russell
    Acked-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

24 Mar, 2007

1 commit


17 Feb, 2007

1 commit

  • add /proc/timer_list, which prints all currently pending (high-res) timers,
    all clock-event sources and their parameters in a human-readable form.

    Sample output:

    Timer List Version: v0.1
    HRTIMER_MAX_CLOCK_BASES: 2
    now at 4246046273872 nsecs

    cpu: 0
    clock 0:
    .index: 0
    .resolution: 1 nsecs
    .get_time: ktime_get_real
    .offset: 1273998312645738432 nsecs
    active timers:
    clock 1:
    .index: 1
    .resolution: 1 nsecs
    .get_time: ktime_get
    .offset: 0 nsecs
    active timers:
    #0: , hrtimer_sched_tick, hrtimer_stop_sched_tick, swapper/0
    # expires at 4246432689566 nsecs [in 386415694 nsecs]
    #1: , hrtimer_wakeup, do_nanosleep, pcscd/2050
    # expires at 4247018194689 nsecs [in 971920817 nsecs]
    #2: , hrtimer_wakeup, do_nanosleep, irqbalance/1909
    # expires at 4247351358392 nsecs [in 1305084520 nsecs]
    #3: , hrtimer_wakeup, do_nanosleep, crond/2157
    # expires at 4249097614968 nsecs [in 3051341096 nsecs]
    #4: , it_real_fn, do_setitimer, syslogd/1888
    # expires at 4251329900926 nsecs [in 5283627054 nsecs]
    .expires_next : 4246432689566 nsecs
    .hres_active : 1
    .check_clocks : 0
    .nr_events : 31306
    .idle_tick : 4246020791890 nsecs
    .tick_stopped : 1
    .idle_jiffies : 986504
    .idle_calls : 40700
    .idle_sleeps : 36014
    .idle_entrytime : 4246019418883 nsecs
    .idle_sleeptime : 4178181972709 nsecs

    cpu: 1
    clock 0:
    .index: 0
    .resolution: 1 nsecs
    .get_time: ktime_get_real
    .offset: 1273998312645738432 nsecs
    active timers:
    clock 1:
    .index: 1
    .resolution: 1 nsecs
    .get_time: ktime_get
    .offset: 0 nsecs
    active timers:
    #0: , hrtimer_sched_tick, hrtimer_restart_sched_tick, swapper/0
    # expires at 4246050084568 nsecs [in 3810696 nsecs]
    #1: , hrtimer_wakeup, do_nanosleep, atd/2227
    # expires at 4261010635003 nsecs [in 14964361131 nsecs]
    #2: , hrtimer_wakeup, do_nanosleep, smartd/2332
    # expires at 5469485798970 nsecs [in 1223439525098 nsecs]
    .expires_next : 4246050084568 nsecs
    .hres_active : 1
    .check_clocks : 0
    .nr_events : 24043
    .idle_tick : 4246046084568 nsecs
    .tick_stopped : 0
    .idle_jiffies : 986510
    .idle_calls : 26360
    .idle_sleeps : 22551
    .idle_entrytime : 4246043874339 nsecs
    .idle_sleeptime : 4170763761184 nsecs

    tick_broadcast_mask: 00000003
    event_broadcast_mask: 00000001

    CPU#0's local event device:

    Clock Event Device: lapic
    capabilities: 0000000e
    max_delta_ns: 807385544
    min_delta_ns: 1443
    mult: 44624025
    shift: 32
    set_next_event: lapic_next_event
    set_mode: lapic_timer_setup
    event_handler: hrtimer_interrupt
    .installed: 1
    .expires: 4246432689566 nsecs

    CPU#1's local event device:

    Clock Event Device: lapic
    capabilities: 0000000e
    max_delta_ns: 807385544
    min_delta_ns: 1443
    mult: 44624025
    shift: 32
    set_next_event: lapic_next_event
    set_mode: lapic_timer_setup
    event_handler: hrtimer_interrupt
    .installed: 1
    .expires: 4246050084568 nsecs

    Clock Event Device: hpet
    capabilities: 00000007
    max_delta_ns: 2147483647
    min_delta_ns: 3352
    mult: 61496110
    shift: 32
    set_next_event: hpet_next_event
    set_mode: hpet_set_mode
    event_handler: handle_nextevt_broadcast

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

    Ingo Molnar