Home
last modified time | relevance | path

Searched refs:this_cpu (Results 1 – 25 of 39) sorted by relevance

12

/linux/Documentation/translations/zh_CN/core-api/
H A Dthis_cpu_ops.rst16 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 Dlocal_ops.rst24 注意,基于 ``local_t`` 的操作不建议用于一般内核操作。请使用 ``this_cpu``
26 经被 ``this_cpu`` 操作所取代。 ``this_cpu`` 操作在一条指令中结合了重
/linux/arch/alpha/kernel/
H A Dsmp.c513 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 Dcpuidle_sysfs.c145 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 Dsmp.c691 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 Dcyclic_kick_wait.bpf.c36 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 Dtrace_clock.c97 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 Dpercpu_freelist.c51 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 Dsmp_64.c644 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 Dnmi.c75 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 Dsmp_processor_id.c14 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 Dtherm_throt.c313 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 Dsmp_tlb.c166 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 Dmachine_kexec.c105 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 Dcpuidle-ux500.c26 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 Dcoupled.c347 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 Dsmp.c784 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 Ddbell.h140 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 Dmmu_context.h49 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 Dbuiltin-sched.c1800 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 Dtest_access_variable_array.c
/linux/arch/arm/mm/
H A Dcontext.c51 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 Drt.c1779 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 Dmshyperv.c384 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 Dlocal_ops.rst19 kernel use. Please use the ``this_cpu`` operations instead unless there is
21 replaced by ``this_cpu`` operations. ``this_cpu`` operations combine the

12