Home
last modified time | relevance | path

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

123

/linux/net/netfilter/
H A Dnft_counter.c34 struct nft_counter *this_cpu; in nft_counter_do_eval() local
43 this_cpu->bytes += pkt->skb->len; in nft_counter_do_eval()
44 this_cpu->packets++; in nft_counter_do_eval()
63 struct nft_counter *this_cpu; in nft_counter_do_init() local
72 this_cpu->packets = in nft_counter_do_init()
76 this_cpu->bytes = in nft_counter_do_init()
109 struct nft_counter *this_cpu; in nft_counter_reset() local
121 struct nft_counter *this_cpu; in nft_counter_fetch() local
133 bytes = this_cpu->bytes; in nft_counter_fetch()
134 packets = this_cpu->packets; in nft_counter_fetch()
[all …]
/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指令执行的前后直接移动该进程。一般来说,这意味着每个处理器的单个计数
192 this_cpu ops的变体
242 全的,这经常是为了统计计数器值。远程写访问可能会出现问题,因为this_cpu操作没有锁
[all …]
/linux/arch/parisc/kernel/
H A Dsmp.c122 int this_cpu = smp_processor_id(); in ipi_interrupt() local
123 struct cpuinfo_parisc *p = &per_cpu(cpu_data, this_cpu); in ipi_interrupt()
128 spinlock_t *lock = &per_cpu(ipi_lock, this_cpu); in ipi_interrupt()
146 smp_debug(100, KERN_DEBUG "CPU%d IPI_NOP\n", this_cpu); in ipi_interrupt()
150 smp_debug(100, KERN_DEBUG "CPU%d IPI_RESCHEDULE\n", this_cpu); in ipi_interrupt()
156 smp_debug(100, KERN_DEBUG "CPU%d IPI_CALL_FUNC\n", this_cpu); in ipi_interrupt()
162 smp_debug(100, KERN_DEBUG "CPU%d IPI_CPU_START\n", this_cpu); in ipi_interrupt()
166 smp_debug(100, KERN_DEBUG "CPU%d IPI_CPU_STOP\n", this_cpu); in ipi_interrupt()
171 smp_debug(100, KERN_DEBUG "CPU%d is alive!\n", this_cpu); in ipi_interrupt()
175 smp_debug(100, KERN_DEBUG "CPU%d ENTER_KGDB\n", this_cpu); in ipi_interrupt()
[all …]
/linux/include/linux/sched/
H A Dtopology.h179 bool cpus_equal_capacity(int this_cpu, int that_cpu);
180 bool cpus_share_cache(int this_cpu, int that_cpu);
181 bool cpus_share_resources(int this_cpu, int that_cpu);
230 static inline bool cpus_equal_capacity(int this_cpu, int that_cpu) in cpus_equal_capacity() argument
235 static inline bool cpus_share_cache(int this_cpu, int that_cpu) in cpus_share_cache() argument
240 static inline bool cpus_share_resources(int this_cpu, int that_cpu) in cpus_share_resources() argument
/linux/arch/sparc/kernel/
H A Dprocess_64.c192 int this_cpu) in __global_reg_self() argument
198 rp = &global_cpu_snapshot[this_cpu].reg; in __global_reg_self()
244 int this_cpu, cpu; in arch_trigger_cpumask_backtrace() local
251 this_cpu = raw_smp_processor_id(); in arch_trigger_cpumask_backtrace()
255 if (cpumask_test_cpu(this_cpu, mask) && this_cpu != exclude_cpu) in arch_trigger_cpumask_backtrace()
256 __global_reg_self(tp, regs, this_cpu); in arch_trigger_cpumask_backtrace()
309 static void __global_pmu_self(int this_cpu) in __global_pmu_self() argument
317 pp = &global_cpu_snapshot[this_cpu].pmu; in __global_pmu_self()
343 int this_cpu, cpu; in pmu_snapshot_all_cpus() local
349 this_cpu = raw_smp_processor_id(); in pmu_snapshot_all_cpus()
[all …]
H A Dsmp_64.c657 this_cpu = smp_processor_id(); in hypervisor_xcall_deliver()
764 this_cpu, ecpuerror_id - 1); in hypervisor_xcall_deliver()
767 this_cpu, enocpu_id - 1); in hypervisor_xcall_deliver()
789 int this_cpu, i, cnt; in xcall_deliver() local
806 this_cpu = smp_processor_id(); in xcall_deliver()
807 tb = &trap_block[this_cpu]; in xcall_deliver()
945 int this_cpu; in smp_flush_dcache_folio_impl() local
954 this_cpu = get_cpu(); in smp_flush_dcache_folio_impl()
956 if (cpu == this_cpu) { in smp_flush_dcache_folio_impl()
1497 int this_cpu = smp_processor_id(); in smp_send_stop() local
[all …]
/linux/arch/x86/kernel/
H A Dsmp.c151 unsigned int old_cpu, this_cpu; in native_stop_other_cpus() local
159 this_cpu = smp_processor_id(); in native_stop_other_cpus()
160 if (!atomic_try_cmpxchg(&stopping_cpu, &old_cpu, this_cpu)) in native_stop_other_cpus()
191 cpumask_clear_cpu(this_cpu, &cpus_stop_mask); in native_stop_other_cpus()
/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/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/lib/
H A Dnmi_backtrace.c40 int i, this_cpu = get_cpu(); in nmi_trigger_cpumask_backtrace() local
61 if (cpumask_test_cpu(this_cpu, to_cpumask(backtrace_mask))) in nmi_trigger_cpumask_backtrace()
66 this_cpu, nr_cpumask_bits, to_cpumask(backtrace_mask)); in nmi_trigger_cpumask_backtrace()
H A Dsmp_processor_id.c14 int this_cpu = raw_smp_processor_id(); in check_preemption_disabled() local
55 return this_cpu; in check_preemption_disabled()
/linux/Documentation/arch/arm/
H A Dvlocks.rst36 bool vlock_trylock(int this_cpu)
39 currently_voting[this_cpu] = 1;
42 currently_voting[this_cpu] = 0;
47 last_vote = this_cpu;
48 currently_voting[this_cpu] = 0;
57 if (last_vote == this_cpu)
100 my_town = towns[(this_cpu >> 4) & 0xf];
101 I_won = vlock_trylock(my_town, this_cpu & 0xf);
104 my_state = states[(this_cpu >> 8) & 0xf];
105 I_won = vlock_lock(my_state, this_cpu & 0xf));
[all …]
/linux/kernel/
H A Dpanic.c195 int old_cpu, this_cpu; in nmi_panic() local
198 this_cpu = raw_smp_processor_id(); in nmi_panic()
201 if (atomic_try_cmpxchg(&panic_cpu, &old_cpu, this_cpu)) in nmi_panic()
203 else if (old_cpu != this_cpu) in nmi_panic()
286 int old_cpu, this_cpu; in panic() local
324 this_cpu = raw_smp_processor_id(); in panic()
327 if (atomic_try_cmpxchg(&panic_cpu, &old_cpu, this_cpu)) { in panic()
329 } else if (old_cpu != this_cpu) in panic()
H A Dsmp.c608 int this_cpu; in smp_call_function_single() local
615 this_cpu = get_cpu(); in smp_call_function_single()
623 WARN_ON_ONCE(cpu_online(this_cpu) && irqs_disabled() in smp_call_function_single()
761 int cpu, last_cpu, this_cpu = smp_processor_id(); in smp_call_function_many_cond() local
776 if (cpu_online(this_cpu) && !oops_in_progress && in smp_call_function_many_cond()
789 if ((scf_flags & SCF_RUN_LOCAL) && cpumask_test_cpu(this_cpu, mask)) in smp_call_function_many_cond()
794 if (cpu == this_cpu) in smp_call_function_many_cond()
802 __cpumask_clear_cpu(this_cpu, cfd->cpumask); in smp_call_function_many_cond()
842 if (run_local && (!cond_func || cond_func(this_cpu, info))) { in smp_call_function_many_cond()
/linux/Documentation/core-api/
H A Dthis_cpu_ops.rst2 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
64 Inner working of this_cpu operations
90 Consider the following this_cpu operation::
166 cpu variable. Most this_cpu operations take a cpu variable.
217 Variants of this_cpu ops
281 something which could be problematic because this_cpu ops do not
282 have lock semantics. A remote write may interfere with a this_cpu
[all …]
/linux/arch/arm/common/
H A DbL_switcher.c149 unsigned int mpidr, this_cpu, that_cpu; in bL_switch_to() local
155 this_cpu = smp_processor_id(); in bL_switch_to()
159 BUG_ON(cpu_logical_map(this_cpu) != ob_mpidr); in bL_switch_to()
164 that_cpu = bL_switcher_cpu_pairing[this_cpu]; in bL_switch_to()
170 this_cpu, ob_mpidr, ib_mpidr); in bL_switch_to()
172 this_cpu = smp_processor_id(); in bL_switch_to()
180 ipi_nr = register_ipi_completion(&inbound_alive, this_cpu); in bL_switch_to()
227 cpu_logical_map(this_cpu) = ib_mpidr; in bL_switch_to()
237 pr_debug("after switch: CPU %d MPIDR %#x\n", this_cpu, mpidr); in bL_switch_to()
/linux/init/
H A Dcalibrate.c279 int this_cpu = smp_processor_id(); in calibrate_delay() local
281 if (per_cpu(cpu_loops_per_jiffy, this_cpu)) { in calibrate_delay()
282 lpj = per_cpu(cpu_loops_per_jiffy, this_cpu); in calibrate_delay()
306 per_cpu(cpu_loops_per_jiffy, this_cpu) = lpj; in calibrate_delay()
/linux/arch/x86/kernel/apic/
H A Dipi.c214 unsigned int cpu, this_cpu = smp_processor_id(); in default_send_IPI_mask_allbutself_phys() local
219 if (cpu == this_cpu) in default_send_IPI_mask_allbutself_phys()
265 unsigned int cpu, this_cpu = smp_processor_id(); in default_send_IPI_mask_allbutself_logical() local
270 if (cpu == this_cpu) in default_send_IPI_mask_allbutself_logical()
H A Dapic_numachip.c104 unsigned int this_cpu = smp_processor_id(); in numachip_send_IPI_mask_allbutself() local
108 if (cpu != this_cpu) in numachip_send_IPI_mask_allbutself()
115 unsigned int this_cpu = smp_processor_id(); in numachip_send_IPI_allbutself() local
119 if (cpu != this_cpu) in numachip_send_IPI_allbutself()
H A Dx2apic_phys.c57 unsigned long this_cpu; in __x2apic_send_IPI_mask() local
65 this_cpu = smp_processor_id(); in __x2apic_send_IPI_mask()
67 if (apic_dest == APIC_DEST_ALLBUT && this_cpu == query_cpu) in __x2apic_send_IPI_mask()
/linux/drivers/thermal/intel/
H A Dtherm_throt.c303 unsigned int i, avg, this_cpu = smp_processor_id(); in throttle_active_work() local
313 this_cpu, in throttle_active_work()
349 this_cpu, in throttle_active_work()
359 schedule_delayed_work_on(this_cpu, &state->therm_work, THERM_THROT_POLL_INTERVAL); in throttle_active_work()
376 unsigned int this_cpu = smp_processor_id(); in therm_throt_process() local
379 struct thermal_state *pstate = &per_cpu(thermal_state, this_cpu); in therm_throt_process()
423 schedule_delayed_work_on(this_cpu, &state->therm_work, THERM_THROT_POLL_INTERVAL); in therm_throt_process()
438 unsigned int this_cpu = smp_processor_id(); in thresh_event_valid() local
439 struct thermal_state *pstate = &per_cpu(thermal_state, this_cpu); in thresh_event_valid()
/linux/arch/s390/kernel/
H A Dmachine_kexec.c82 int this_cpu, cpu; in __machine_kdump() local
86 this_cpu = smp_find_processor_id(stap()); in __machine_kdump()
88 if (cpu == this_cpu) in __machine_kdump()
/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()
/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()

123