12 Feb, 2011
1 commit
-
In the continuing effort to avoid kernel addresses leaking to
unprivileged users, this patch switches to %pK for
/proc/timer_list reporting.Signed-off-by: Kees Cook
Cc: John Stultz
Cc: Dan Rosenberg
Cc: Eugene Teo
Cc: Linus Torvalds
LKML-Reference:
Signed-off-by: Ingo Molnar
11 Dec, 2010
1 commit
-
Converts the hrtimer code to use the new timerlist infrastructure
Signed-off-by: John Stultz
LKML Reference:
Reviewed-by: Thomas Gleixner
CC: Alessandro Zummo
CC: Thomas Gleixner
CC: Richard Cochran
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
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 dataReported-by: Uwe Kleine-Koenig
Signed-off-by: Thomas Gleixner
17 Dec, 2009
1 commit
-
struct cpumask will be undefined soon with CONFIG_CPUMASK_OFFSTACK=y,
to avoid them being declared on the stack.cpumask_bits() does what we want here (of course, this code is crap).
Signed-off-by: Rusty Russell
To: Thomas Gleixner
15 Dec, 2009
1 commit
-
Convert locks which cannot be sleeping locks in preempt-rt to
raw_spinlocks.Signed-off-by: Thomas Gleixner
Acked-by: Peter Zijlstra
Acked-by: Ingo Molnar
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_listInspired by a patch from Marcelo.
Reported-by: Michael Tokarev
Signed-off-by: Thomas Gleixner
Tested-by: Marcelo Tosatti
Cc: kvm@vger.kernel.org
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 -
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:
02 Oct, 2009
1 commit
-
[akpm@linux-foundation.org: fix KVM]
Signed-off-by: Alexey Dobriyan
Acked-by: Mike Frysinger
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
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
22 Oct, 2008
1 commit
-
Conflicts:
kernel/time/tick-sched.c
Signed-off-by: Thomas Gleixner
20 Oct, 2008
3 commits
-
The base address of a (per cpu) clock base is a useful debug info.
Add it and bump the version number of timer_lists.Signed-off-by: Thomas Gleixner
-
The per cpu clock events device output of timer_list lacks an
association of the device to the cpu which is annoying when looking at
the output of /proc/timer_list from a 128 way system.Add the CPU number info and mark the broadcast device in the device
list printout.Signed-off-by: Thomas Gleixner
-
The current timer_list output prints the address of the on stack copy
of the active hrtimer instead of the hrtimer itself.Print the address of the real timer instead.
Signed-off-by: Thomas Gleixner
08 Sep, 2008
1 commit
-
to help debugging and visibility of timer ranges, show them
in the existing timer list in /proc/timer_listSigned-off-by: Arjan van de Ven
06 Sep, 2008
1 commit
-
In order to be able to do range hrtimers we need to use accessor functions
to the "expire" member of the hrtimer struct.
This patch converts kernel/* to these accessors.Signed-off-by: Arjan van de Ven
29 Apr, 2008
1 commit
-
Use proc_create()/proc_create_data() to make sure that ->proc_fops and ->data
be setup before gluing PDE to main tree.Signed-off-by: Denis V. Lunev
Cc: Alexey Dobriyan
Cc: "Eric W. Biederman"
Cc: Ingo Molnar
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
18 Feb, 2008
1 commit
-
Relative expiry time can get negative, so it should be signed.
Signed-off-by: Pavel Machek
Signed-off-by: Thomas Gleixner
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
29 Oct, 2007
1 commit
-
This makes sure printk format strings contain no more than a single
line.Signed-off-by: Vegard Nossum
Signed-off-by: Thomas Gleixner
01 Aug, 2007
1 commit
-
On every open/close one struct seq_operations leaks.
Kudos to /proc/slab_allocators.Signed-off-by: Alexey Dobriyan
Acked-by: Ingo Molnar
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
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
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
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 -
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
24 Mar, 2007
1 commit
-
Fix the print formatting of three unsigned long fields in /proc/timer_list,
which are currently being formatted as signed long.Signed-off-by: James Morris
Acked-by: Ingo Molnar
Cc: Thomas Gleixner
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
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 nsecscpu: 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 nsecscpu: 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 nsecstick_broadcast_mask: 00000003
event_broadcast_mask: 00000001CPU#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 nsecsCPU#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 nsecsClock 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_broadcastSigned-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