Home
last modified time | relevance | path

Searched +full:test +full:- +full:cpu (Results 1 – 25 of 1064) sorted by relevance

12345678910>>...43

/Linux-v6.1/kernel/events/
Dhw_breakpoint_test.c1 // SPDX-License-Identifier: GPL-2.0
3 * KUnit test for hw_breakpoint constraints accounting logic.
8 #include <kunit/test.h>
15 #define TEST_REQUIRES_BP_SLOTS(test, slots) \ argument
18 kunit_skip((test), "Requires breakpoint slots: %d > %d", slots, \
23 #define TEST_EXPECT_NOSPC(expr) KUNIT_EXPECT_EQ(test, -ENOSPC, PTR_ERR(expr))
31 static struct perf_event *register_test_bp(int cpu, struct task_struct *tsk, int idx) in register_test_bp() argument
42 return perf_event_create_kernel_counter(&attr, cpu, tsk, NULL, NULL); in register_test_bp()
65 static void fill_one_bp_slot(struct kunit *test, int *id, int cpu, struct task_struct *tsk) in fill_one_bp_slot() argument
67 struct perf_event *bp = register_test_bp(cpu, tsk, *id); in fill_one_bp_slot()
[all …]
/Linux-v6.1/lib/
Dcpumask_kunit.c1 // SPDX-License-Identifier: GPL-2.0-only
8 #include <kunit/test.h>
9 #include <linux/cpu.h>
16 #define EXPECT_FOR_EACH_CPU_EQ(test, mask) \ argument
20 int cpu, iter = 0; \
21 for_each_cpu(cpu, m) \
23 KUNIT_EXPECT_EQ_MSG((test), mask_weight, iter, MASK_MSG(mask)); \
26 #define EXPECT_FOR_EACH_CPU_NOT_EQ(test, mask) \ argument
30 int cpu, iter = 0; \
31 for_each_cpu_not(cpu, m) \
[all …]
/Linux-v6.1/tools/perf/tests/shell/
Drecord_offcpu.sh3 # SPDX-License-Identifier: GPL-2.0
5 set -e
11 rm -f ${perfdata}
12 rm -f ${perfdata}.old
13 trap - exit term int
23 echo "Checking off-cpu privilege"
25 if [ `id -u` != 0 ]
27 echo "off-cpu test [Skipped permission]"
31 if perf record --off-cpu -o /dev/null --quiet true 2>&1 | grep BUILD_BPF_SKEL
33 echo "off-cpu test [Skipped missing BPF support]"
[all …]
Dtest_intel_pt.sh3 # SPDX-License-Identifier: GPL-2.0
5 set -e
8 perf list | grep -q 'intel_pt//' || exit 2
17 temp_dir=$(mktemp -d /tmp/perf-test-intel-pt-sh.XXXXXXXXXX)
19 tmpfile="${temp_dir}/tmp-perf.data"
20 perfdatafile="${temp_dir}/test-perf.data"
21 outfile="${temp_dir}/test-out.txt"
22 errfile="${temp_dir}/test-err.txt"
30 trap - EXIT TERM INT
31 sane=$(echo "${temp_dir}" | cut -b 1-26)
[all …]
/Linux-v6.1/Documentation/devicetree/bindings/sound/
Dtest-component.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/sound/test-component.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Test Component
10 - Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
15 - test-cpu
16 - test-cpu-verbose
17 - test-cpu-verbose-dai
18 - test-cpu-verbose-component
[all …]
/Linux-v6.1/drivers/platform/x86/intel/ifs/
Druntest.c1 // SPDX-License-Identifier: GPL-2.0-only
4 #include <linux/cpu.h>
17 * core will update results of the test.
27 * Number of TSC cycles that a logical CPU will wait for the other
28 * logical CPU on the core in the WRMSR(ACTIVATE_SCAN).
56 "Exceeded number of Logical Processors (LP) allowed to run Scan-At-Field concurrently",
60 static void message_not_tested(struct device *dev, int cpu, union ifs_status status) in message_not_tested() argument
63 dev_info(dev, "CPU(s) %*pbl: SCAN operation did not start. %s\n", in message_not_tested()
64 cpumask_pr_args(cpu_smt_mask(cpu)), in message_not_tested()
67 dev_info(dev, "CPU(s) %*pbl: software timeout during scan\n", in message_not_tested()
[all …]
Difs.h1 /* SPDX-License-Identifier: GPL-2.0-only */
8 * DOC: In-Field Scan
11 * In-Field Scan
15 * ------------
18 * a CPU core to detect problems that are not caught by parity or ECC checks.
19 * Future CPUs will support more than one type of test which will show up
20 * with a new platform-device instance-id, for now only .0 is exposed.
24 * ---------
28 * family-model-stepping.
31 * -----------------
[all …]
/Linux-v6.1/tools/perf/tests/
Dtopology.c1 // SPDX-License-Identifier: GPL-2.0
14 #define TEMPL "/tmp/perf-test-XXXXXX"
26 return -1; in get_temp()
45 session->evlist = evlist__new_default(); in session_write_header()
46 TEST_ASSERT_VAL("can't get evlist", session->evlist); in session_write_header()
50 session->evlist = evlist__new(); in session_write_header()
51 TEST_ASSERT_VAL("can't get evlist", session->evlist); in session_write_header()
53 parse_events(session->evlist, "cpu_core/cycles/", &err); in session_write_header()
57 perf_header__set_feat(&session->header, HEADER_CPU_TOPOLOGY); in session_write_header()
58 perf_header__set_feat(&session->header, HEADER_NRCPUS); in session_write_header()
[all …]
Dswitch-tracking.c1 // SPDX-License-Identifier: GPL-2.0
15 #include "parse-events.h"
76 if (event->header.type == PERF_RECORD_COMM && in check_comm()
77 (pid_t)event->comm.pid == getpid() && in check_comm()
78 (pid_t)event->comm.tid == getpid() && in check_comm()
79 strcmp(event->comm.comm, comm) == 0) { in check_comm()
80 if (switch_tracking->comm_seen[nr]) { in check_comm()
82 return -1; in check_comm()
84 switch_tracking->comm_seen[nr] = 1; in check_comm()
85 pr_debug3("comm event: %s nr: %d\n", event->comm.comm, nr); in check_comm()
[all …]
/Linux-v6.1/tools/testing/selftests/cgroup/
Dtest_cpuset_prs.sh2 # SPDX-License-Identifier: GPL-2.0
4 # Test for cpuset v2 partition root state (PRS)
12 echo "Test SKIPPED"
16 [[ $(id -u) -eq 0 ]] || skip_test "Test must be run as root!"
19 [[ -d /sys/kernel/debug/sched ]] && echo Y > /sys/kernel/debug/sched/verbose
25 CGROUP2=$(mount -t cgroup2 | head -1 | awk -e '{print $3}')
26 [[ -n "$CGROUP2" ]] || skip_test "Cgroup v2 mount point not found!"
28 CPUS=$(lscpu | grep "^CPU(s)" | sed -e "s/.*:[[:space:]]*//")
29 [[ $CPUS -lt 8 ]] && skip_test "Test needs at least 8 cpus available!"
35 while [[ "$1" = -* ]]
[all …]
/Linux-v6.1/arch/x86/kernel/
Dtsc_sync.c1 // SPDX-License-Identifier: GPL-2.0
8 * print a warning if not and turn off the TSC clock-source.
10 * The warp-check is point-to-point between two CPUs, the CPU
11 * initiating the bootup is the 'source CPU', the freshly booting
12 * CPU is the 'target CPU'.
14 * Only two CPUs may participate - they can enter in any order.
15 * ( The serial nature of the boot logic and the CPU hotplug lock
62 if (!resume && time_before(jiffies, adj->nextcheck)) in tsc_verify_tsc_adjust()
65 adj->nextcheck = jiffies + HZ; in tsc_verify_tsc_adjust()
68 if (adj->adjusted == curval) in tsc_verify_tsc_adjust()
[all …]
/Linux-v6.1/drivers/cpufreq/
Damd-pstate-ut.c1 // SPDX-License-Identifier: GPL-1.0-or-later
3 * AMD Processor P-state Frequency Driver Unit Test
9 * The AMD P-State Unit Test is a test module for testing the amd-pstate
12 * test to avoid the kernel regression during the update. 3) We can
17 * additional test cases to improve the depth and coverage of the test.
19 * See Documentation/admin-guide/pm/amd-pstate.rst Unit Tests for
20 * amd-pstate to get more detail.
29 #include <linux/amd-pstate.h>
35 * amd_pstate_ut: used as a shortform for AMD P-State unit test.
50 * Kernel module for testing the AMD P-State unit test
[all …]
/Linux-v6.1/tools/testing/selftests/kvm/
Drseq_test.c1 // SPDX-License-Identifier: GPL-2.0-only
26 * Any bug related to task migration is likely to be timing-dependent; perform
48 static void sys_getcpu(unsigned *cpu) in sys_getcpu() argument
52 r = syscall(__NR_getcpu, cpu, NULL, NULL); in sys_getcpu()
56 static int next_cpu(int cpu) in next_cpu() argument
59 * Advance to the next CPU, skipping those that weren't in the original in next_cpu()
63 * burn a lot cycles and the test will take longer than normal to in next_cpu()
67 cpu++; in next_cpu()
68 if (cpu > max_cpu) { in next_cpu()
69 cpu = min_cpu; in next_cpu()
[all …]
/Linux-v6.1/drivers/soc/fsl/qbman/
DKconfig1 # SPDX-License-Identifier: GPL-2.0-only
26 Compiles in additional checks, to sanity-check the drivers and
30 tristate "BMan self-tests"
32 Compile the BMan self-test code. These tests will
37 bool "High-level API self-test"
41 This requires the presence of cpu-affine portals, and performs
42 high-level API testing with them (whichever portal(s) are affine
43 to the cpu(s) the test executes on).
46 tristate "QMan self-tests"
48 Compile self-test code for QMan.
[all …]
/Linux-v6.1/sound/soc/generic/
Daudio-graph-card2-custom-sample.dtsi1 // SPDX-License-Identifier: GPL-2.0
3 * audio-graph-card2-custom-sample.dtsi
8 * This sample indicates how to use audio-graph-card2 and its
9 * custom driver. "audio-graph-card2-custom-sample" is the custome driver
10 * which is using audio-graph-card2.
15 * #include "../../../../../sound/soc/generic/audio-graph-card2-custom-sample.dtsi"
23 * "compatible" on each test-component. see below
26 * - compatible = "test-cpu";
27 * + compatible = "test-cpu-verbose";
32 * - compatible = "test-codec";
[all …]
/Linux-v6.1/tools/testing/selftests/powerpc/ptrace/
Dptrace-perf-hwbreak.c1 // SPDX-License-Identifier: GPL-2.0+
21 /* Non-overlapping address range */
38 while (getline(&line, &len, fp) != -1) { in pid_max_addr()
51 return -1; in pid_max_addr()
57 attr->type = PERF_TYPE_BREAKPOINT; in perf_user_event_attr_set()
58 attr->size = sizeof(struct perf_event_attr); in perf_user_event_attr_set()
59 attr->bp_type = HW_BREAKPOINT_R; in perf_user_event_attr_set()
60 attr->bp_addr = addr; in perf_user_event_attr_set()
61 attr->bp_len = len; in perf_user_event_attr_set()
62 attr->exclude_kernel = 1; in perf_user_event_attr_set()
[all …]
/Linux-v6.1/tools/testing/selftests/rcutorture/bin/
Dkvm-assign-cpus.sh2 # SPDX-License-Identifier: GPL-2.0+
4 # Produce awk statements roughly depicting the system's CPU and cache
8 # Usage: kvm-assign-cpus.sh /path/to/sysfs
10 T=/tmp/kvm-assign-cpus.sh.$$
11 trap 'rm -rf $T' 0 2
14 sysfsdir=${1-/sys/devices/system/node}
17 sed -e 's/^/# /' < $T/msg
20 nodelist="`ls -d node*`"
23 if ! test -d $i/
28 for j in $i/cpu*/cache/index*
[all …]
Dkvm-get-cpus-script.sh2 # SPDX-License-Identifier: GPL-2.0+
7 # Usage: kvm-get-cpus-script.sh /path/to/cpu/arrays /path/to/put/script [ /path/to/state ]
9 # The CPU arrays are output by kvm-assign-cpus.sh, and are valid awk
13 # non-empty), and can also be output by this script.
15 cpuarrays="${1-/sys/devices/system/node}"
19 if ! test -f "$cpuarrays"
25 if ! test -d "$scriptdir" || ! test -x "$scriptdir" || ! test -w "$scriptdir"
35 if test -r "$statefile"
42 # Do we have the system architecture to guide CPU affinity?
48 # Return a comma-separated list of the next n CPUs.
[all …]
/Linux-v6.1/tools/power/cpupower/bench/
DREADME-BENCH1 This is cpufreq-bench, a microbenchmark for the cpufreq framework.
7 - Identify worst case performance loss when doing dynamic frequency
9 - Identify average reaction time of a governor to CPU load changes
10 - (Stress) Testing whether a cpufreq low level driver or governor works
12 - Identify cpufreq related performance regressions between kernels
13 - Possibly Real time priority testing? -> what happens if there are
15 - ...
18 - Power saving related regressions (In fact as better the performance
21 - Real world (workloads)
27 cpufreq-bench helps to test the condition of a given cpufreq governor.
[all …]
/Linux-v6.1/tools/testing/selftests/net/
Dreuseport_bpf_cpu.c1 // SPDX-License-Identifier: GPL-2.0
3 * Test functionality of BPF filters with SO_REUSEPORT. This program creates
4 * an SO_REUSEPORT receiver group containing one socket per CPU core. It then
45 addr4->sin_family = AF_INET; in build_rcv_group()
46 addr4->sin_addr.s_addr = htonl(INADDR_ANY); in build_rcv_group()
47 addr4->sin_port = htons(PORT); in build_rcv_group()
51 addr6->sin6_family = AF_INET6; in build_rcv_group()
52 addr6->sin6_addr = in6addr_any; in build_rcv_group()
53 addr6->sin6_port = htons(PORT); in build_rcv_group()
105 saddr4->sin_family = AF_INET; in send_from_cpu()
[all …]
/Linux-v6.1/tools/testing/selftests/intel_pstate/
Drun.sh2 # SPDX-License-Identifier: GPL-2.0
4 # This test runs on Intel x86 based hardware which support the intel_pstate
5 # driver. The test checks the frequency settings from the maximum turbo
7 # test runs the aperf.c program to put load on each processor.
13 # pstate the cpu is in, and the value of
14 # /sys/devices/system/cpu/intel_pstate/max_perf_pct X maximum turbo state
22 #/tmp/result.3100:1:cpu MHz : 2899.980
23 #/tmp/result.3100:2:cpu MHz : 2900.000
27 # and the test will error out in those cases. The result.X file can be checked
29 # files can be re-evaluated by setting EVALUATE_ONLY to 1 below.
[all …]
/Linux-v6.1/samples/bpf/
Dmap_perf_test_user.c1 // SPDX-License-Identifier: GPL-2.0-only
82 static void test_hash_prealloc(int cpu) in test_hash_prealloc() argument
90 printf("%d:hash_map_perf pre-alloc %lld events per sec\n", in test_hash_prealloc()
91 cpu, max_cnt * 1000000000ll / (time_get_ns() - start_time)); in test_hash_prealloc()
104 /* Populate the lru_hash_map for LRU_HASH_LOOKUP perf test. in pre_test_lru_hash_lookup()
120 static void do_test_lru(enum test_type test, int cpu) in do_test_lru() argument
129 if (test == INNER_LRU_HASH_PREALLOC && cpu) { in do_test_lru()
130 /* If CPU is not 0, create inner_lru hash map and insert the fd in do_test_lru()
131 * value into the array_of_lru_hash map. In case of CPU 0, in do_test_lru()
140 assert(cpu < MAX_NR_CPUS); in do_test_lru()
[all …]
/Linux-v6.1/tools/testing/selftests/vm/
Duserfaultfd.c1 // SPDX-License-Identifier: GPL-2.0-only
7 * This test allocates two virtual areas and bounces the physical
11 * There are three threads running per CPU:
13 * 1) one per-CPU thread takes a per-page pthread_mutex in a random
15 * area_src), and increments a per-page counter in the same page,
18 * 2) another per-CPU thread handles the userfaults generated by
22 * 3) one last per-CPU thread transfers the memory in the background
24 * 2). Each cpu thread takes cares of transferring a portion of the
32 * per-CPU threads 1 by triggering userfaults inside
85 /* test using /dev/userfaultfd, instead of userfaultfd(2) */
[all …]
/Linux-v6.1/kernel/
Dscftorture.c1 // SPDX-License-Identifier: GPL-2.0+
3 // Torture test for smp_call_function() and friends.
14 #include <linux/cpu.h>
49 // Wait until there are multiple CPUs before starting test.
51 "Holdoff time before test start (s)");
53 torture_param(int, nthreads, -1, "# threads, defaults to -1 for all CPUs.");
54 torture_param(int, onoff_holdoff, 0, "Time after boot before CPU hotplugs (s)");
55 torture_param(int, onoff_interval, 0, "Time between CPU hotplugs (s), 0=disable");
58 torture_param(int, stutter, 5, "Number of jiffies to run/halt test, 0=disable");
59 torture_param(bool, use_cpus_read_lock, 0, "Use cpus_read_lock() to exclude CPU hotplug.");
[all …]
/Linux-v6.1/Documentation/locking/
Dlocktorture.rst2 Kernel Lock Torture Test Operation
13 grepping for "torture"). The test is started when the module is loaded,
17 This torture test consists of creating a number of kernel threads which
30 Locktorture-specific
31 --------------------
49 - "lock_busted":
52 - "spin_lock":
55 - "spin_lock_irq":
58 - "rw_lock":
61 - "rw_lock_irq":
[all …]

12345678910>>...43