/linux/Documentation/devicetree/bindings/cpu/ |
H A D | idle-states.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/cpu/idle-states.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> 11 - Anup Patel <anup@brainfault.org> 15 1 - Introduction 18 ARM and RISC-V systems contain HW capable of managing power consumption 19 dynamically, where cores can be put in different low-power states (ranging 22 run-time, can be specified through device tree bindings representing the [all …]
|
/linux/tools/tracing/rtla/sample/ |
H A D | timerlat_load.py | 2 # SPDX-License-Identifier: GPL-2.0-only 7 # so rtla can measure and provide auto-analysis for the overall latency (IOW 10 # Before running it, you need to dispatch timerlat with -U option in a terminal. 13 # timerlat_load.py 1 -p 95 15 # The "Timerlat IRQ" is the IRQ latency, The thread latency is the latency 16 # for the python process to get the CPU. The Ret from user Timer Latency is 17 # the overall latency. In other words, it is the response time for that 21 # It is in python because it is easy to read :-) 27 parser = argparse.ArgumentParser(description='user-space timerlat thread in Python') 29 parser.add_argument("-p", "--prio", type=int, help='FIFO priority') [all …]
|
/linux/tools/tracing/rtla/src/ |
H A D | timerlat_top.c | 1 // SPDX-License-Identifier: GPL-2.0 49 * timerlat_free_top - free runtime data 53 free(data->cpu_data); in timerlat_free_top() 59 timerlat_free_top(tool->data); in timerlat_free_top_tool() 64 * timerlat_alloc_histogram - alloc runtime data 75 data->nr_cpus = nr_cpus; in timerlat_alloc_top() 78 data->cpu_data = calloc(1, sizeof(*data->cpu_data) * nr_cpus); in timerlat_alloc_top() 79 if (!data->cpu_data) in timerlat_alloc_top() 84 data->cpu_data[cpu].min_irq = ~0; in timerlat_alloc_top() 85 data->cpu_data[cpu].min_thread = ~0; in timerlat_alloc_top() [all …]
|
H A D | timerlat_hist.c | 1 // SPDX-License-Identifier: GPL-2.0 51 * timerlat_free_histogram - free runtime data 59 for (cpu = 0; cpu < data->nr_cpus; cpu++) { in timerlat_free_histogram() 60 if (data->hist[cpu].irq) in timerlat_free_histogram() 61 free(data->hist[cpu].irq); in timerlat_free_histogram() 63 if (data->hist[cpu].thread) in timerlat_free_histogram() 64 free(data->hist[cpu].thread); in timerlat_free_histogram() 66 if (data->hist[cpu].user) in timerlat_free_histogram() 67 free(data->hist[cpu].user); in timerlat_free_histogram() 72 if (data->hist) in timerlat_free_histogram() [all …]
|
H A D | timerlat_aa.c | 1 // SPDX-License-Identifier: GPL-2.0 23 * Per-cpu data statistics and data. 29 /* timerlat IRQ latency */ 34 /* timerlat Thread latency */ 64 * If now - timestamp is <= latency, it might have influenced 65 * in the timerlat irq latency. Otherwise, ignore it. 135 * timerlat_aa_get_data - Get the per-cpu data from the timerlat context 140 return &taa_ctx->taa_data[cpu]; in timerlat_aa_get_data() 144 * timerlat_aa_irq_latency - Handles timerlat IRQ event 154 taa_data->curr_state = TIMERLAT_WAITING_THREAD; in timerlat_aa_irq_latency() [all …]
|
/linux/tools/power/cpupower/utils/ |
H A D | cpuidle-set.c | 1 // SPDX-License-Identifier: GPL-2.0 19 {"disable-by-latency", required_argument, NULL, 'D'}, 20 {"enable-all", no_argument, NULL, 'E'}, 30 unsigned long long latency = 0, state_latency; in cmd_idle_set() local 36 if (ret == -1) in cmd_idle_set() 46 param = -1; in cmd_idle_set() 54 exit(EXIT_FAILURE); in cmd_idle_set() 61 param = -1; in cmd_idle_set() 66 latency = strtoull(optarg, &endptr, 10); in cmd_idle_set() 68 printf(_("Bad latency value: %s\n"), optarg); in cmd_idle_set() [all …]
|
/linux/tools/perf/tests/shell/ |
H A D | ftrace.sh | 3 # SPDX-License-Identifier: GPL-2.0 5 set -e 8 if [ "$(id -u)" != 0 ]; then 10 exit 2 16 rm -f "${output}" 18 trap - EXIT TERM INT 23 exit 1 25 trap trap_cleanup EXIT TERM INT 32 perf ftrace -F > "${output}" 42 perf ftrace trace --graph-opts depth=5 sleep 0.1 > "${output}" [all …]
|
H A D | sched.sh | 3 # SPDX-License-Identifier: GPL-2.0 5 set -e 7 if [ "$(id -u)" != 0 ]; then 9 exit 2 18 rm -f "${perfdata}" 19 rm -f "${perfdata}".old 21 trap - EXIT TERM INT 27 exit 1 29 trap trap_cleanup EXIT TERM INT 33 perf test -w noploop 10 & [all …]
|
/linux/Documentation/devicetree/bindings/thermal/ |
H A D | thermal-idle.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 4 --- 5 $id: http://devicetree.org/schemas/thermal/thermal-idle.yaml# 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 11 - Daniel Lezcano <daniel.lezcano@linaro.org> 22 const: thermal-idle 24 A thermal-idle node describes the idle cooling device properties to 27 '#cooling-cells': 31 the cooling-maps reference. The first cell is the minimum cooling state 34 duration-us: [all …]
|
/linux/tools/testing/selftests/kvm/ |
H A D | rseq_test.c | 1 // SPDX-License-Identifier: GPL-2.0-only 33 * Any bug related to task migration is likely to be timing-dependent; perform 89 * is in-progress, while a completely different count indicates in migration_worker() 96 * stable, i.e. while changing affinity is in-progress. in migration_worker() 108 * Wait 1-10us before proceeding to the next iteration and more in migration_worker() 118 * the guest, the guest will trigger a IO/MMIO exit all the in migration_worker() 120 * the generic "exit to userspace" logic, not by KVM. The in migration_worker() 121 * exit to userspace is necessary to give the test a chance in migration_worker() 125 * to trigger an exit that is handled by KVM, but any such in migration_worker() 126 * exit requires architecture specific code. in migration_worker() [all …]
|
/linux/Documentation/tools/rtla/ |
H A D | common_timerlat_options.rst | 1 .. |threshold| replace:: **-a/--auto**, **-i/--irq**, or **-T/--thread** 2 .. |thresharg| replace:: -T 6 For time-sensitive actions, it is recommended to run **rtla timerlat** with BPF 11 **-a**, **--auto** *us* 14 while debugging the system. It is equivalent to use **-T** *us* **-s** *us* 15 **-t**. By default, *timerlat* tracer uses FIFO:95 for *timerlat* threads, 16 thus equilavent to **-P** *f:95*. 18 **-p**, **--period** *us* 22 **-i**, **--irq** *us* 24 Stop trace if the *IRQ* latency is higher than the argument in us. [all …]
|
H A D | rtla-timerlat-top.rst | 4 rtla-timerlat-top 6 ------------------------------------------- 7 Measures the operating system timer latency 8 ------------------------------------------- 24 seem with the option **-T**. 37 **--aa-only** *us* 40 Print the auto-analysis if the system hits the stop tracing condition. This option 47 In the example below, the timerlat tracer is dispatched in cpus *1-23* in the 48 automatic trace mode, instructing the tracer to stop if a *40 us* latency or 51 # timerlat -a 40 -c 1-23 -q [all …]
|
/linux/tools/testing/selftests/bpf/benchs/ |
H A D | bench_local_storage_rcu_tasks_trace.c | 1 // SPDX-License-Identifier: GPL-2.0 72 fprintf(stderr, "benchmark doesn't support multi-producer!\n"); in validate() 73 exit(1); in validate() 77 exit(1); in validate() 83 exit(1); in validate() 94 return -1; in kthread_pid_ticks() 112 exit(1); in kthread_pid_ticks() 169 if (!bpf_program__attach(ctx.skel->progs.get_local)) { in local_storage_tasks_trace_setup() 174 if (!bpf_program__attach(ctx.skel->progs.pregp_step)) { in local_storage_tasks_trace_setup() 179 if (!bpf_program__attach(ctx.skel->progs.postgp)) { in local_storage_tasks_trace_setup() [all …]
|
/linux/drivers/cpuidle/ |
H A D | dt_idle_states.c | 1 // SPDX-License-Identifier: GPL-2.0-only 9 #define pr_fmt(fmt) "DT idle-states: " fmt 32 idle_state->enter = match_id->data; in init_state_node() 38 idle_state->enter_s2idle = match_id->data; in init_state_node() 40 err = of_property_read_u32(state_node, "wakeup-latency-us", in init_state_node() 41 &idle_state->exit_latency); in init_state_node() 45 err = of_property_read_u32(state_node, "entry-latency-us", in init_state_node() 48 pr_debug(" * %pOF missing entry-latency-us property\n", in init_state_node() 50 return -EINVAL; in init_state_node() 53 err = of_property_read_u32(state_node, "exit-latency-us", in init_state_node() [all …]
|
/linux/Documentation/devicetree/bindings/arm/ |
H A D | psci.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> 15 processors") can be used by Linux to initiate various CPU-centric power 25 r0 => 32-bit Function ID / return value 26 {r1 - r3} => Parameters 40 - description: 44 - description: 52 - const: arm,psci-0.2 [all …]
|
/linux/tools/testing/selftests/dma/ |
H A D | dma_map_benchmark.c | 1 // SPDX-License-Identifier: GPL-2.0-only 29 int threads = 1, seconds = 20, node = -1; in main() 37 while ((opt = getopt(argc, argv, "t:s:n:b:d:x:g:")) != -1) { in main() 61 return -1; in main() 66 fprintf(stderr, "invalid number of threads, must be in 1-%d\n", in main() 68 exit(1); in main() 72 fprintf(stderr, "invalid number of seconds, must be in 1-%d\n", in main() 74 exit(1); in main() 78 fprintf(stderr, "invalid transmit delay, must be in 0-%ld\n", in main() 80 exit(1); in main() [all …]
|
/linux/tools/testing/selftests/ftrace/test.d/trigger/ |
H A D | trigger-trace-marker-synthetic-kernel.tc | 2 # SPDX-License-Identifier: GPL-2.0 3 # description: trace_marker trigger - test histogram with synthetic event against kernel event 12 echo "Test histogram kernel event to trace_marker latency histogram trigger" 14 echo 'latency u64 lat' > synthetic_events 16 echo 'hist:keys=common_pid:lat=common_timestamp.usecs-$ts0:onmatch(sched.sched_waking).latency($lat… 17 echo 'hist:keys=common_pid,lat:sort=lat' > events/synthetic/latency/trigger 24 grep 'hitcount: *1$' events/synthetic/latency/hist > /dev/null || \ 27 exit 0
|
H A D | trigger-trace-marker-synthetic.tc | 2 # SPDX-License-Identifier: GPL-2.0 3 # description: trace_marker trigger - test histogram with synthetic event 12 echo "Test histogram trace_marker to trace_marker latency histogram trigger" 14 echo 'latency u64 lat' > synthetic_events 16 echo 'hist:keys=common_pid:lat=common_timestamp.usecs-$ts0:onmatch(ftrace.print).latency($lat) if b… 17 echo 'hist:keys=common_pid,lat:sort=lat' > events/synthetic/latency/trigger 18 echo -n "start" > trace_marker 19 echo -n "end" > trace_marker 21 cnt=`grep 'hitcount: *1$' events/ftrace/print/hist | wc -l` 23 if [ $cnt -ne 2 ]; then [all …]
|
/linux/tools/testing/selftests/drivers/net/netdevsim/ |
H A D | psample.sh | 2 # SPDX-License-Identifier: GPL-2.0 32 rm -f $CAPTURE_FILE 48 if [ $(cat $CAPTURE_FILE | wc -l) -eq 0 ]; then 59 if [ $(cat $CAPTURE_FILE | wc -l) -ne 0 ]; then 74 grep -q -e "group 1234" $CAPTURE_FILE 81 grep -q -e "group 4321" $CAPTURE_FILE 87 grep -q -e "group 4321" $CAPTURE_FILE 105 grep -q -e "in-ifindex 1234" $CAPTURE_FILE 106 check_err $? "Sampled packets reported with wrong in-ifindex" 108 grep -q -e "out-ifindex 4321" $CAPTURE_FILE [all …]
|
/linux/Documentation/trace/ |
H A D | timerlat-tracer.rst | 6 find sources of wakeup latencies of real-time threads. Like cyclictest, 8 computes a *wakeup latency* value as the difference between the *current 13 ----- 28 # _-----=> irqs-off 29 # / _----=> need-resched 30 # | / _---=> hardirq/softirq 31 # || / _--=> preempt-depth 34 # TASK-PID CPU# |||| TIMESTAMP ID CONTEXT LATENCY 36 <idle>-0 [000] d.h1 54.029328: #1 context irq timer_latency 932 ns 37 <...>-867 [000] .... 54.029339: #1 context thread timer_latency 11700 ns [all …]
|
/linux/Documentation/admin-guide/pm/ |
H A D | intel_idle.rst | 1 .. SPDX-License-Identifier: GPL-2.0 24 Documentation/admin-guide/pm/cpuidle.rst if you have not done that yet.] 28 processor's functional blocks into low-power states. That instruction takes two 38 only way to pass early-configuration-time parameters to it is via the kernel 55 C-state requests from the OS (e.g., C6 requests) to C1. The idea is that 56 firmware monitors CPU wake-up rate, and if it is higher than a 57 platform-specific threshold, the firmware demotes deep C-state requests 59 wake-ups per second, and it keeps the CPU in C1. When the CPU stays in 63 .. _intel-idle-enumeration-of-states: 71 as C-states (in the ACPI terminology) or idle states. The list of meaningful [all …]
|
/linux/tools/perf/tests/shell/base_report/ |
H A D | setup.sh | 2 # perftool-testsuite :: perf_report 3 # SPDX-License-Identifier: GPL-2.0 11 # We need some sample data for perf-report testing 22 test -d "$HEADER_TAR_DIR" || mkdir -p "$HEADER_TAR_DIR" 24 SW_EVENT="cpu-clock" 26 $CMD_PERF record -asdg -e $SW_EVENT -o $CURRENT_TEST_DIR/perf.data -- $CMD_LONGER_SLEEP 2> $LOGS_DI… 37 …d --latency -o $CURRENT_TEST_DIR/perf.data.1 bash -c "for i in {1..100} ; do cat /proc/cpuinfo 1> … 41 cat $LOGS_DIR/setup-latency.log 45 "$RE_LINE_RECORD1" "$RE_LINE_RECORD2" < $LOGS_DIR/setup-latency.log 52 exit $?
|
/linux/Documentation/devicetree/bindings/power/ |
H A D | power-domain.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/power/power-domain.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Rafael J. Wysocki <rafael@kernel.org> 11 - Kevin Hilman <khilman@kernel.org> 12 - Ulf Hansson <ulf.hansson@linaro.org> 25 \#power-domain-cells property in the PM domain provider node. 29 pattern: "^(power-controller|power-domain|performance-domain)([@-].*)?$" 31 domain-idle-states: [all …]
|
/linux/tools/testing/selftests/ftrace/test.d/preemptirq/ |
H A D | irqsoff_tracer.tc | 2 # SPDX-License-Identifier: GPL-2.0 46 grep -q "tracer: preemptoff" trace || fail 49 grep -E -q "5.....us : <stack trace>" trace || fail 51 # Check for 500ms of latency 52 grep -E -q "latency: 5..... us" trace || fail 69 grep -q "tracer: irqsoff" trace || fail 72 grep -E -q "5.....us : <stack trace>" trace || fail 74 # Check for 500ms of latency 75 grep -E -q "latency: 5..... us" trace || fail 78 exit 0
|
/linux/arch/arm64/boot/dts/sprd/ |
H A D | ums9620.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0 OR MIT) 8 #include <dt-bindings/interrupt-controller/arm-gic.h> 11 interrupt-parent = <&gic>; 12 #address-cells = <2>; 13 #size-cells = <2>; 16 #address-cells = <2>; 17 #size-cells = <0>; 19 cpu-map { 50 compatible = "arm,cortex-a55"; 52 enable-method = "psci"; [all …]
|