| /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/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() 642 int cpu, this_cpu = smp_processor_id(); in flush_tlb_mm() local 644 if (!cpu_online(cpu) || cpu == this_cpu) in flush_tlb_mm() 689 int cpu, this_cpu = smp_processor_id(); in flush_tlb_page() local 691 if (!cpu_online(cpu) || cpu == this_cpu) in flush_tlb_page() 743 int cpu, this_cpu = smp_processor_id(); in flush_icache_user_page() 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/kernel/ |
| H A D | smp.c | 691 int this_cpu; in __smp_call_function_single() local 700 this_cpu = get_cpu(); in __smp_call_function_single() 704 if (!cpumask_test_cpu(this_cpu, mask)) in __smp_call_function_single() 705 cpu = sched_numa_find_nth_cpu(mask, 0, cpu_to_node(this_cpu)); in __smp_call_function_single() 707 cpu = this_cpu; in __smp_call_function_single() 716 WARN_ON_ONCE(cpu_online(this_cpu) && irqs_disabled() in __smp_call_function_single() 736 csd->node.src = this_cpu; in __smp_call_function_single() 897 int cpu, last_cpu, this_cpu; in smp_call_function_many_cond() local 901 this_cpu = get_cpu(); in smp_call_function_many_cond() 915 if (cpu_online(this_cpu) && !oops_in_progress && in smp_call_function_many_cond() [all …]
|
| /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/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/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/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/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()
|
| H A D | coupled.c | 347 static void cpuidle_coupled_poke_others(int this_cpu, in cpuidle_coupled_poke_others() argument 353 if (cpu != this_cpu && cpu_online(cpu)) in cpuidle_coupled_poke_others()
|
| /linux/arch/arm64/kernel/ |
| H A D | smp.c | 784 unsigned int this_cpu; in smp_prepare_cpus() local 788 this_cpu = smp_processor_id(); in smp_prepare_cpus() 789 store_cpu_topology(this_cpu); in smp_prepare_cpus() 790 numa_store_cpu_info(this_cpu); in smp_prepare_cpus() 791 numa_add_cpu(this_cpu); in smp_prepare_cpus() 978 int this_cpu = raw_smp_processor_id(); in kgdb_roundup_cpus() local 983 if (cpu == this_cpu) in kgdb_roundup_cpus()
|
| /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/tools/testing/selftests/bpf/progs/ |
| H A D | test_access_variable_array.c | |
| /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/kernel/sched/ |
| H A D | rt.c | 1779 int this_cpu = smp_processor_id(); in find_lowest_rq() local 1823 if (!cpumask_test_cpu(this_cpu, lowest_mask)) in find_lowest_rq() 1824 this_cpu = -1; /* Skip this_cpu opt if not among lowest */ in find_lowest_rq() 1835 if (this_cpu != -1 && in find_lowest_rq() 1836 cpumask_test_cpu(this_cpu, sched_domain_span(sd))) { in find_lowest_rq() 1838 return this_cpu; in find_lowest_rq() 1856 if (this_cpu != -1) in find_lowest_rq() 1857 return this_cpu; in find_lowest_rq() 2130 int this_cpu = smp_processor_id(); in rto_next_cpu() local 2155 if (cpu == this_cpu) in rto_next_cpu() [all …]
|
| /linux/arch/x86/kernel/cpu/ |
| H A D | mshyperv.c | 384 unsigned int old_cpu, this_cpu; in hv_nmi_unknown() local 390 this_cpu = raw_smp_processor_id(); in hv_nmi_unknown() 391 if (!atomic_try_cmpxchg(&nmi_cpu, &old_cpu, this_cpu)) in hv_nmi_unknown()
|
| /linux/Documentation/core-api/ |
| H A D | local_ops.rst | 19 kernel use. Please use the ``this_cpu`` operations instead unless there is 21 replaced by ``this_cpu`` operations. ``this_cpu`` operations combine the
|