/linux-6.12.1/kernel/events/ |
D | hw_breakpoint_test.c | 1 // 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-6.12.1/tools/perf/tests/shell/ |
D | record_offcpu.sh | 3 # 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 version --build-options 2>&1 | grep HAVE_BPF_SKEL | grep -q OFF 33 echo "off-cpu test [Skipped missing BPF support]" [all …]
|
D | record_bpf_filter.sh | 3 # 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 BPF-filter privilege" 25 if ! perf record -e task-clock --filter 'period > 1' \ 26 -o /dev/null --quiet true 2>&1 28 if [ "$(id -u)" != 0 ] 30 echo "try 'sudo perf record --setup-filter pin' first." [all …]
|
D | stat.sh | 3 # SPDX-License-Identifier: GPL-2.0 5 set -e 9 echo "Basic stat command test" 10 if ! perf stat true 2>&1 | grep -E -q "Performance counter stats for 'true':" 12 echo "Basic stat command test [Failed]" 16 echo "Basic stat command test [Success]" 20 echo "stat record and report test" 21 if ! perf stat record -o - true | perf stat report -i - 2>&1 | \ 22 grep -E -q "Performance counter stats for 'pipe':" 24 echo "stat record and report test [Failed]" [all …]
|
D | test_intel_pt.sh | 3 # SPDX-License-Identifier: GPL-2.0 5 set -e 8 perf list | grep -q 'intel_pt//' || exit 2 18 temp_dir=$(mktemp -d /tmp/perf-test-intel-pt-sh.XXXXXXXXXX) 20 tmpfile="${temp_dir}/tmp-perf.data" 21 perfdatafile="${temp_dir}/test-perf.data" 22 outfile="${temp_dir}/test-out.txt" 23 errfile="${temp_dir}/test-err.txt" 31 trap - EXIT TERM INT 32 sane=$(echo "${temp_dir}" | cut -b 1-26) [all …]
|
D | record.sh | 3 # SPDX-License-Identifier: GPL-2.0 5 set -e 20 testprog="perf test -w thloop" 21 cpu_pmu_dir="/sys/bus/event_source/devices/cpu*" 26 default_fd_limit=$(ulimit -Sn) 27 # With option --threads=cpu the number of open file descriptors should be 36 rm -rf "${perfdata}" 37 rm -rf "${perfdata}".old 39 trap - EXIT TERM INT 49 echo "Basic --per-thread mode test" [all …]
|
/linux-6.12.1/lib/ |
D | test_objpool.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * Test module for lockless object pool 61 /* per-cpu worker */ 64 struct ot_test *test; /* test parameters */ member 85 static void *ot_kzalloc(struct ot_test *test, long size) in ot_kzalloc() argument 90 atomic_long_add(size, &test->data.kmalloc.alloc); in ot_kzalloc() 94 static void ot_kfree(struct ot_test *test, void *ptr, long size) in ot_kfree() argument 98 atomic_long_add(size, &test->data.kmalloc.free); in ot_kfree() 102 static void ot_mem_report(struct ot_test *test) in ot_mem_report() argument 106 pr_info("memory allocation summary for %s\n", test->name); in ot_mem_report() [all …]
|
D | cpumask_kunit.c | 1 // 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_OP_EQ(test, op, mask1, mask2) \ argument 31 int cpu, iter = 0; \ 34 for_each_cpu_##op(cpu, mask1, mask2) \ [all …]
|
/linux-6.12.1/Documentation/devicetree/bindings/sound/ |
D | test-component.yaml | 1 # 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-6.12.1/drivers/platform/x86/intel/ifs/ |
D | runtest.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 #include <linux/cpu.h> 17 * core will update results of the test. 40 * Number of TSC cycles that a logical CPU will wait for the other 41 * logical CPU on the core in the WRMSR(ACTIVATE_SCAN). 71 "Exceeded number of Logical Processors (LP) allowed to run Scan-At-Field concurrently", 77 static void message_not_tested(struct device *dev, int cpu, union ifs_status status) in message_not_tested() argument 87 dev_warn(dev, "CPU(s) %*pbl: Scan controller error. Batch: %02x version: 0x%x\n", in message_not_tested() 88 cpumask_pr_args(cpu_smt_mask(cpu)), ifsd->cur_batch, ifsd->loaded_version); in message_not_tested() 93 dev_info(dev, "CPU(s) %*pbl: SCAN operation did not start. %s\n", in message_not_tested() [all …]
|
/linux-6.12.1/tools/perf/tests/ |
D | topology.c | 1 // SPDX-License-Identifier: GPL-2.0 14 #define TEMPL "/tmp/perf-test-XXXXXX" 26 return -1; in get_temp() 44 session->evlist = evlist__new_default(); in session_write_header() 45 TEST_ASSERT_VAL("can't get evlist", session->evlist); in session_write_header() 47 perf_header__set_feat(&session->header, HEADER_CPU_TOPOLOGY); in session_write_header() 48 perf_header__set_feat(&session->header, HEADER_NRCPUS); in session_write_header() 49 perf_header__set_feat(&session->header, HEADER_ARCH); in session_write_header() 51 session->header.data_size += DATA_SIZE; in session_write_header() 54 !perf_session__write_header(session, session->evlist, data.file.fd, true)); in session_write_header() [all …]
|
/linux-6.12.1/tools/testing/selftests/mm/ |
D | uffd-stress.c | 1 // 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 36 #include <asm-generic/unistd.h> [all …]
|
/linux-6.12.1/tools/testing/selftests/resctrl/ |
D | resctrl.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 28 #define PHYS_ID_PATH "/sys/devices/system/cpu/cpu" 32 * CPU vendor IDs 48 * @cpu: CPU number to which the benchmark will be bound to 53 int cpu; member 59 * resctrl_test: resctrl test definition 60 * @name: Test name 61 * @group: Test group - a common name for tests that share some characteristic 62 * (e.g., L3 CAT test belongs to the CAT group). Can be NULL 63 * @resource: Resource to test (e.g., MB, L3, L2, etc.) [all …]
|
D | cat_test.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Cache Allocation Technology (CAT) test 18 * Minimum difference in LLC misses between a test with n+1 bits CBM to the 19 * test with n bits is MIN_DIFF_PERCENT_PER_BIT * (n - 1). With e.g. 5 vs 4 21 * MIN_DIFF_PERCENT_PER_BIT * (4 - 1) = 3 percent. 44 float delta = (__s64)(avg_llc_val - *prev_avg_llc_val); in show_results_info() 81 fp = fopen(param->filename, "r"); in check_results() 85 return -1; in check_results() 115 MIN_DIFF_PERCENT_PER_BIT * (bits - 1), in check_results() 137 * cat_test - Execute CAT benchmark and measure cache misses [all …]
|
/linux-6.12.1/tools/testing/selftests/cgroup/ |
D | test_cpuset_v1_hp.sh | 2 # SPDX-License-Identifier: GPL-2.0 4 # Test the special cpuset v1 hotplug case where a cpuset become empty of 10 echo "Test SKIPPED" 14 [[ $(id -u) -eq 0 ]] || skip_test "Test must be run as root!" 17 CPUSET=$(mount -t cgroup | grep cpuset | head -1 | awk -e '{print $3}') 18 [[ -n "$CPUSET" ]] || skip_test "cpuset v1 mount point not found!" 21 # Create a test cpuset, put a CPU and a task there and offline that CPU 23 TDIR=test$$ 24 [[ -d $CPUSET/$TDIR ]] || mkdir $CPUSET/$TDIR 32 echo "Unexpected cpuset $NEWCS, test FAILED!" [all …]
|
D | test_cpuset_prs.sh | 2 # 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!" 23 CGROUP2=$(mount -t cgroup2 | head -1 | awk -e '{print $3}') 24 [[ -n "$CGROUP2" ]] || skip_test "Cgroup v2 mount point not found!" 28 NR_CPUS=$(lscpu | grep "^CPU(s):" | sed -e "s/.*:[[:space:]]*//") 29 [[ $NR_CPUS -lt 8 ]] && skip_test "Test needs at least 8 cpus available!" 32 if [[ -c /dev/console && -w /dev/console ]] 44 while [[ "$1" = -* ]] [all …]
|
/linux-6.12.1/arch/x86/kernel/ |
D | tsc_sync.c | 1 // 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 63 if (!resume && time_before(jiffies, adj->nextcheck)) in tsc_verify_tsc_adjust() 66 adj->nextcheck = jiffies + HZ; in tsc_verify_tsc_adjust() 69 if (adj->adjusted == curval) in tsc_verify_tsc_adjust() [all …]
|
/linux-6.12.1/drivers/cpufreq/ |
D | amd-pstate-ut.c | 1 // SPDX-License-Identifier: GPL-2.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. 32 #include "amd-pstate.h" 36 * amd_pstate_ut: used as a shortform for AMD P-State unit test. 51 * Kernel module for testing the AMD P-State unit test [all …]
|
/linux-6.12.1/drivers/soc/fsl/qbman/ |
D | Kconfig | 1 # 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-6.12.1/tools/testing/selftests/kvm/ |
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 51 static int next_cpu(int cpu) in next_cpu() argument 54 * Advance to the next CPU, skipping those that weren't in the original in next_cpu() 58 * burn a lot cycles and the test will take longer than normal to in next_cpu() 62 cpu++; in next_cpu() 63 if (cpu > max_cpu) { in next_cpu() 64 cpu = min_cpu; in next_cpu() 65 TEST_ASSERT(CPU_ISSET(cpu, &possible_mask), in next_cpu() 66 "Min CPU = %d must always be usable", cpu); in next_cpu() [all …]
|
/linux-6.12.1/tools/testing/selftests/amd-pstate/ |
D | run.sh | 2 # SPDX-License-Identifier: GPL-2.0 18 # amd-pstate-ut only run on x86/x86_64 AMD systems. 19 ARCH=$(uname -m 2>/dev/null | sed -e 's/i.86/x86/' -e 's/x86_64/x86/') 20 VENDOR=$(cat /proc/cpuinfo | grep -m 1 'vendor_id' | awk '{print $NF}') 38 CURRENT_TEST=amd-pstate 41 # Kselftest framework requirement - SKIP code is 4. 43 all_scaling_names=("acpi-cpufreq" "amd-pstate") 60 for cpu in `ls $CPUROOT | grep "cpu[0-9].*"`; do 61 if [ -d $CPUROOT/$cpu/cpufreq ]; then 77 policies=$(ls $CPUFREQROOT| grep "policy[0-9].*") [all …]
|
/linux-6.12.1/tools/testing/selftests/rcutorture/bin/ |
D | kvm-assign-cpus.sh | 2 # 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="`mktemp -d ${TMPDIR-/tmp}/kvm-assign-cpus.sh.XXXXXX`" 11 trap 'rm -rf $T' 0 2 13 sysfsdir=${1-/sys/devices/system/node} 16 sed -e 's/^/# /' < $T/msg 19 nodelist="`ls -d node*`" 22 if ! test -d $i/ 27 for j in $i/cpu*/cache/index* [all …]
|
D | kvm-get-cpus-script.sh | 2 # 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-6.12.1/tools/power/cpupower/bench/ |
D | README-BENCH | 1 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-6.12.1/tools/testing/selftests/net/ |
D | reuseport_bpf_cpu.c | 1 // 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 …]
|