| /linux/Documentation/translations/zh_CN/core-api/ |
| H A D | this_cpu_ops.rst | 16 this_cpu操作 22 this_cpu操作是一种优化访问与当前执行处理器相关的每CPU变量的方法。这是通过使用段寄 25 this_cpu操作将每CPU变量的偏移量添加到处理器特定的每CPU基址上,并将该操作编码到对 42 this_cpu操作的主要用途是优化计数器操作。 44 定义了以下具有隐含抢占保护的this_cpu()操作。可以使用这些操作而不用担心抢占和中断:: 63 this_cpu操作的内部工作 85 请思考下面this_cpu操作:: 105 会在this_cpu指令执行的前后直接移动该进程。一般来说,这意味着每个处理器的单个计数 141 在每CPU操作的上下文中,上面表达式说明x是一个每CPU变量。大多数this_cpu操作都需要一 180 如果我们后面不使用 ``this_cpu ops`` 来操作字段,则指针的计算可能需要使用 [all …]
|
| H A D | local_ops.rst | 24 注意,基于 ``local_t`` 的操作不建议用于一般内核操作。请使用 ``this_cpu`` 26 经被 ``this_cpu`` 操作所取代。 ``this_cpu`` 操作在一条指令中结合了重
|
| /linux/kernel/ |
| H A D | smp.c | 717 int this_cpu; in __smp_call_function_single() 726 this_cpu = get_cpu(); in __smp_call_function_single() 730 if (!cpumask_test_cpu(this_cpu, mask)) in __smp_call_function_single() 731 cpu = sched_numa_find_nth_cpu(mask, 0, cpu_to_node(this_cpu)); in __smp_call_function_single() 733 cpu = this_cpu; in __smp_call_function_single() 742 WARN_ON_ONCE(cpu_online(this_cpu) && irqs_disabled() in __smp_call_function_single() 762 csd->node.src = this_cpu; 923 int cpu, last_cpu, this_cpu; in smp_call_function_many_cond() 927 this_cpu = get_cpu(); in smp_call_function_many_cond() 941 if (cpu_online(this_cpu) in smp_call_function_many_cond() 692 int this_cpu; __smp_call_function_single() local 898 int cpu, last_cpu, this_cpu; smp_call_function_many_cond() local [all...] |
| /linux/tools/power/cpupower/utils/idle_monitor/ |
| H A D | cpuidle_sysfs.c | 145 int this_cpu; in cpuidle_register() local 147 this_cpu = sched_getcpu(); in cpuidle_register() 150 cpuidle_sysfs_monitor.hw_states_num = cpuidle_state_count(this_cpu); in cpuidle_register() 156 tmp = cpuidle_state_name(this_cpu, num); in cpuidle_register() 165 tmp = cpuidle_state_desc(this_cpu, num); in cpuidle_register()
|
| /linux/tools/testing/selftests/sched_ext/ |
| H A D | cyclic_kick_wait.bpf.c | 36 s32 this_cpu = bpf_get_smp_processor_id(); in BPF_STRUCT_OPS() local 49 tgt = target_cpu(this_cpu); in BPF_STRUCT_OPS() 50 if (tgt < 0 || tgt == this_cpu) in BPF_STRUCT_OPS()
|
| /linux/kernel/trace/ |
| H A D | trace_clock.c | 97 int this_cpu; in trace_clock_global() local 102 this_cpu = raw_smp_processor_id(); in trace_clock_global() 116 now = sched_clock_cpu(this_cpu); in trace_clock_global()
|
| /linux/arch/sparc/kernel/ |
| H A D | smp_64.c | 644 int this_cpu, tot_cpus, prev_sent, i, rem; in hypervisor_xcall_deliver() local 654 this_cpu = smp_processor_id(); in hypervisor_xcall_deliver() 761 this_cpu, ecpuerror_id - 1); in hypervisor_xcall_deliver() 764 this_cpu, enocpu_id - 1); in hypervisor_xcall_deliver() 771 this_cpu, tot_cpus, tb->cpu_list_pa, tb->cpu_mondo_block_pa); in hypervisor_xcall_deliver() 777 this_cpu, first_cpu, (tot_retries + retries), tot_cpus); in hypervisor_xcall_deliver() 786 int this_cpu, i, cnt; in xcall_deliver() local 803 this_cpu = smp_processor_id(); in xcall_deliver() 804 tb = &trap_block[this_cpu]; in xcall_deliver() 817 if (i == this_cpu || !cpu_online(i)) in xcall_deliver() [all …]
|
| H A D | nmi.c | 75 int this_cpu = smp_processor_id(); in die_nmi() local 82 panic("Watchdog detected hard LOCKUP on cpu %d", this_cpu); in die_nmi() 84 WARN(1, "Watchdog detected hard LOCKUP on cpu %d", this_cpu); in die_nmi()
|
| /linux/kernel/bpf/ |
| H A D | percpu_freelist.c | 51 int cpu, this_cpu; in __pcpu_freelist_push() local 56 this_cpu = raw_smp_processor_id(); in __pcpu_freelist_push() 58 for_each_cpu_wrap(cpu, cpu_possible_mask, this_cpu) { in __pcpu_freelist_push() 59 if (cpu == this_cpu) in __pcpu_freelist_push()
|
| /linux/Documentation/core-api/ |
| H A D | this_cpu_ops.rst | 2 this_cpu operations 8 this_cpu operations are a way of optimizing access to per cpu 14 this_cpu operations add a per cpu variable offset to the processor 41 The main use of the this_cpu operations has been to optimize counter 44 The following this_cpu() operations with implied preemption protection 64 Inner working of this_cpu operations 90 Consider the following this_cpu operation:: 114 after the this_cpu instruction is executed. In general this means that 176 cpu variable. Most this_cpu operations take a cpu variable. 216 if we do not make use of this_cpu ops later to manipulate fields:: [all …]
|
| /linux/arch/alpha/kernel/ |
| H A D | smp.c | 513 int this_cpu = smp_processor_id(); in handle_ipi() local 514 unsigned long *pending_ipis = &ipi_data[this_cpu].bits; in handle_ipi() 519 this_cpu, *pending_ipis, regs->pc)); in handle_ipi() 546 this_cpu, which); in handle_ipi() 554 cpu_data[this_cpu].ipi_count++; in handle_ipi() 638 int cpu, this_cpu = smp_processor_id(); in mm_context_elsewhere() local 644 if (cpu == this_cpu) in mm_context_elsewhere()
|
| /linux/lib/ |
| H A D | smp_processor_id.c | 14 int this_cpu = raw_smp_processor_id(); in check_preemption_disabled() local 53 return this_cpu; in check_preemption_disabled()
|
| /linux/drivers/thermal/intel/ |
| H A D | therm_throt.c | 313 unsigned int i, avg, this_cpu = smp_processor_id(); in throttle_active_work() local 323 this_cpu, in throttle_active_work() 359 this_cpu, in throttle_active_work() 369 schedule_delayed_work_on(this_cpu, &state->therm_work, THERM_THROT_POLL_INTERVAL); in throttle_active_work() 386 unsigned int this_cpu = smp_processor_id(); in therm_throt_process() local 389 struct thermal_state *pstate = &per_cpu(thermal_state, this_cpu); in therm_throt_process() 433 schedule_delayed_work_on(this_cpu, &state->therm_work, THERM_THROT_POLL_INTERVAL); in therm_throt_process() 448 unsigned int this_cpu = smp_processor_id(); in thresh_event_valid() local 449 struct thermal_state *pstate = &per_cpu(thermal_state, this_cpu); in thresh_event_valid()
|
| /linux/arch/arm/kernel/ |
| H A D | smp_tlb.c | 166 int this_cpu; in broadcast_tlb_mm_a15_erratum() local 172 this_cpu = get_cpu(); in broadcast_tlb_mm_a15_erratum() 173 a15_erratum_get_cpumask(this_cpu, mm, &mask); in broadcast_tlb_mm_a15_erratum()
|
| H A D | machine_kexec.c | 105 int cpu, this_cpu = raw_smp_processor_id(); in crash_smp_send_stop() local 112 if (cpu == this_cpu) in crash_smp_send_stop()
|
| /linux/include/linux/sched/ |
| H A D | topology.h | 202 bool cpus_equal_capacity(int this_cpu, int that_cpu); 203 bool cpus_share_cache(int this_cpu, int that_cpu); 204 bool cpus_share_resources(int this_cpu, int that_cpu);
|
| /linux/drivers/cpuidle/ |
| H A D | cpuidle-ux500.c | 26 int this_cpu = smp_processor_id(); in ux500_enter_idle() local 49 if (!prcmu_is_cpu_in_wfi(this_cpu ? 0 : 1)) in ux500_enter_idle()
|
| /linux/arch/x86/kernel/cpu/ |
| H A D | common.c | 209 static const struct cpu_dev *this_cpu = &default_cpu; variable 736 if (!this_cpu) in table_lookup_model() 739 info = this_cpu->legacy_models; in table_lookup_model() 882 if (this_cpu->legacy_cache_size) in cpu_detect_cache_sizes() 883 l2size = this_cpu->legacy_cache_size(c, l2size); in cpu_detect_cache_sizes() 906 if (this_cpu->c_detect_tlb) 907 this_cpu->c_detect_tlb(c); in cpu_detect_tlb() 929 this_cpu = cpu_devs[i]; in get_cpu_vendor() 930 c->x86_vendor = this_cpu->c_x86_vendor; in get_cpu_vendor() 939 this_cpu in get_cpu_vendor() [all...] |
| H A D | mshyperv.c | 369 unsigned int old_cpu, this_cpu; in ms_hyperv_platform() 375 this_cpu = raw_smp_processor_id(); 376 if (!atomic_try_cmpxchg(&nmi_cpu, &old_cpu, this_cpu)) 384 unsigned int old_cpu, this_cpu; hv_nmi_unknown() local
|
| /linux/arch/powerpc/include/asm/ |
| H A D | dbell.h | 140 int this_cpu = get_cpu(); in doorbell_try_core_ipi() local 143 if (cpumask_test_cpu(cpu, cpu_sibling_mask(this_cpu))) { in doorbell_try_core_ipi()
|
| /linux/arch/arm/include/asm/ |
| H A D | mmu_context.h | 49 void a15_erratum_get_cpumask(int this_cpu, struct mm_struct *mm, 52 static inline void a15_erratum_get_cpumask(int this_cpu, struct mm_struct *mm, in a15_erratum_get_cpumask() argument
|
| /linux/tools/perf/ |
| H A D | builtin-sched.c | 1800 static void print_sched_map(struct perf_sched *sched, struct perf_cpu this_cpu, int cpus_nr, in process_sched_switch_event() 1821 if (cpu.cpu == this_cpu.cpu) in process_sched_runtime_event() 1824 color_fprintf(stdout, cpu.cpu != this_cpu.cpu ? color : cpu_color, "%c", symbol); in process_sched_runtime_event() 1835 if (cpu.cpu == this_cpu.cpu) in perf_sched__process_fork_event() 1860 struct perf_cpu this_cpu = { in process_sched_migrate_task_event() 1872 if (this_cpu.cpu >= MAX_CPUS || this_cpu.cpu < 0) { in perf_sched__process_tracepoint_sample() 1874 sample->file_offset, this_cpu.cpu); in perf_sched__process_tracepoint_sample() 1878 if (this_cpu.cpu > sched->max_cpu.cpu) in perf_sched__process_tracepoint_sample() 1879 sched->max_cpu = this_cpu; in perf_sched__process_tracepoint_sample() 1579 print_sched_map(struct perf_sched * sched,struct perf_cpu this_cpu,int cpus_nr,const char * color,bool sched_out) print_sched_map() argument 1639 struct perf_cpu this_cpu = { map_switch_event() local 1799 int this_cpu = sample->cpu, err = 0; process_sched_switch_event() local 3192 struct perf_cpu this_cpu = { perf_timehist__process_sample() local 4392 struct perf_cpu this_cpu; perf_sched__process_schedstat() local [all...] |
| /linux/arch/arm/mm/ |
| H A D | context.c | 51 void a15_erratum_get_cpumask(int this_cpu, struct mm_struct *mm, in a15_erratum_get_cpumask() argument 61 if (cpu == this_cpu) in a15_erratum_get_cpumask()
|
| /linux/tools/testing/selftests/bpf/progs/ |
| H A D | test_access_variable_array.c | |
| /linux/kernel/sched/ |
| H A D | rt.c | 1782 int this_cpu = smp_processor_id(); in find_lowest_rq() local 1826 if (!cpumask_test_cpu(this_cpu, lowest_mask)) in find_lowest_rq() 1827 this_cpu = -1; /* Skip this_cpu opt if not among lowest */ in find_lowest_rq() 1838 if (this_cpu != -1 && in find_lowest_rq() 1839 cpumask_test_cpu(this_cpu, sched_domain_span(sd))) { in find_lowest_rq() 1841 return this_cpu; in find_lowest_rq() 1859 if (this_cpu != -1) in find_lowest_rq() 1860 return this_cpu; in find_lowest_rq() 2133 int this_cpu = smp_processor_id(); in rto_next_cpu() local 2158 if (cpu == this_cpu) in rto_next_cpu() [all …]
|