Home
last modified time | relevance | path

Searched refs:READ_ONCE (Results 1 – 25 of 1321) sorted by relevance

12345678910>>...53

/linux-6.6.21/kernel/rcu/
Dtree_stall.h30 int cpu_stall_timeout = READ_ONCE(rcu_exp_cpu_stall_timeout); in rcu_exp_jiffies_till_stall_check()
59 int till_stall_check = READ_ONCE(rcu_cpu_stall_timeout); in rcu_jiffies_till_stall_check()
103 return !time_before(j, READ_ONCE(rcu_state.gp_start) + d); in rcu_gp_might_be_stalled()
181 rcu_state.n_force_qs_gpstart = READ_ONCE(rcu_state.n_force_qs); in record_gp_stall_check_time()
200 if (!READ_ONCE(rcu_kick_kthreads)) in rcu_stall_kick_kthreads()
202 j = READ_ONCE(rcu_state.jiffies_kick_kthreads); in rcu_stall_kick_kthreads()
204 (rcu_gp_in_progress() || READ_ONCE(rcu_state.gp_flags))) { in rcu_stall_kick_kthreads()
409 unsigned long j = jiffies - READ_ONCE(rcu_state.gp_activity); in rcu_is_gp_kthread_starving()
430 j = jiffies - READ_ONCE(rdp->rcuc_activity); in rcu_is_rcuc_kthread_starving()
538 data_race(READ_ONCE(rcu_state.gp_flags)), in rcu_check_gp_kthread_starvation()
[all …]
Dsync.c78 WARN_ON_ONCE(READ_ONCE(rsp->gp_state) == GP_IDLE); in rcu_sync_func()
79 WARN_ON_ONCE(READ_ONCE(rsp->gp_state) == GP_PASSED); in rcu_sync_func()
155 wait_event(rsp->gp_wait, READ_ONCE(rsp->gp_state) >= GP_PASSED); in rcu_sync_enter()
170 WARN_ON_ONCE(READ_ONCE(rsp->gp_state) == GP_IDLE); in rcu_sync_exit()
171 WARN_ON_ONCE(READ_ONCE(rsp->gp_count) == 0); in rcu_sync_exit()
193 WARN_ON_ONCE(READ_ONCE(rsp->gp_count)); in rcu_sync_dtor()
194 WARN_ON_ONCE(READ_ONCE(rsp->gp_state) == GP_PASSED); in rcu_sync_dtor()
Dsrcutiny.c99 int newval = READ_ONCE(ssp->srcu_lock_nesting[idx]) - 1; in __srcu_read_unlock()
102 if (!newval && READ_ONCE(ssp->srcu_gp_waiting) && in_task()) in __srcu_read_unlock()
120 if (ssp->srcu_gp_running || ULONG_CMP_GE(ssp->srcu_idx, READ_ONCE(ssp->srcu_idx_max))) in srcu_drive_gp()
133 swait_event_exclusive(ssp->srcu_wq, !READ_ONCE(ssp->srcu_lock_nesting[idx])); in srcu_drive_gp()
153 if (ULONG_CMP_LT(ssp->srcu_idx, READ_ONCE(ssp->srcu_idx_max))) in srcu_drive_gp()
163 if (ULONG_CMP_GE(READ_ONCE(ssp->srcu_idx_max), cookie)) in srcu_gp_start_if_needed()
166 if (!READ_ONCE(ssp->srcu_gp_running)) { in srcu_gp_start_if_needed()
228 ret = (READ_ONCE(ssp->srcu_idx) + 3) & ~0x1; in get_state_synchronize_srcu()
255 unsigned long cur_s = READ_ONCE(ssp->srcu_idx); in poll_state_synchronize_srcu()
Drcu_segcblist.h15 return READ_ONCE(rclp->len); in rcu_cblist_n_cbs()
45 return !READ_ONCE(rsclp->head); in rcu_segcblist_empty()
54 return READ_ONCE(rsclp->len); in rcu_segcblist_n_cbs()
73 return READ_ONCE(rsclp->flags) & flags; in rcu_segcblist_test_flags()
114 return !READ_ONCE(*READ_ONCE(rsclp->tails[seg])); in rcu_segcblist_restempty()
/linux-6.6.21/net/ipv4/
Dtcp_plb.c30 if (!READ_ONCE(net->ipv4.sysctl_tcp_plb_enabled)) in tcp_plb_update_state()
34 if (cong_ratio < READ_ONCE(net->ipv4.sysctl_tcp_plb_cong_thresh)) in tcp_plb_update_state()
37 READ_ONCE(net->ipv4.sysctl_tcp_plb_rehash_rounds)) in tcp_plb_update_state()
52 if (!READ_ONCE(net->ipv4.sysctl_tcp_plb_enabled)) in tcp_plb_check_rehash()
56 READ_ONCE(net->ipv4.sysctl_tcp_plb_rehash_rounds); in tcp_plb_check_rehash()
58 idle_rehash = READ_ONCE(net->ipv4.sysctl_tcp_plb_idle_rehash_rounds) && in tcp_plb_check_rehash()
61 READ_ONCE(net->ipv4.sysctl_tcp_plb_idle_rehash_rounds); in tcp_plb_check_rehash()
71 max_suspend = 2 * READ_ONCE(net->ipv4.sysctl_tcp_plb_suspend_rto_sec) * HZ; in tcp_plb_check_rehash()
96 if (!READ_ONCE(net->ipv4.sysctl_tcp_plb_enabled)) in tcp_plb_update_state_upon_rto()
99 pause = READ_ONCE(net->ipv4.sysctl_tcp_plb_suspend_rto_sec) * HZ; in tcp_plb_update_state_upon_rto()
Dtcp_timer.c33 user_timeout = READ_ONCE(icsk->icsk_user_timeout); in tcp_clamp_rto_to_user_timeout()
50 user_timeout = READ_ONCE(icsk->icsk_user_timeout); in tcp_clamp_probe0_to_user_timeout()
72 WRITE_ONCE(sk->sk_err, READ_ONCE(sk->sk_err_soft) ? : ETIMEDOUT); in tcp_write_err()
115 if (READ_ONCE(sk->sk_err_soft)) in tcp_out_of_resources()
148 int retries = READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_orphan_retries); /* May be zero. */ in tcp_orphan_retries()
151 if (READ_ONCE(sk->sk_err_soft) && !alive) in tcp_orphan_retries()
168 if (!READ_ONCE(net->ipv4.sysctl_tcp_mtu_probing)) in tcp_mtu_probing()
176 mss = min(READ_ONCE(net->ipv4.sysctl_tcp_base_mss), mss); in tcp_mtu_probing()
177 mss = max(mss, READ_ONCE(net->ipv4.sysctl_tcp_mtu_probe_floor)); in tcp_mtu_probing()
178 mss = max(mss, READ_ONCE(net->ipv4.sysctl_tcp_min_snd_mss)); in tcp_mtu_probing()
[all …]
/linux-6.6.21/Documentation/translations/ko_KR/
Dmemory-barriers.txt259 Q = READ_ONCE(P); D = READ_ONCE(*Q);
266 READ_ONCE() 는 메모리 배리어 명령도 내게 되어 있어서, DEC Alpha CPU 는
271 DEC Alpha 에서 수행되든 아니든, READ_ONCE() 는 컴파일러로부터의 악영향
277 a = READ_ONCE(*X); WRITE_ONCE(*X, b);
285 WRITE_ONCE(*X, c); d = READ_ONCE(*X);
296 (*) 컴파일러가 READ_ONCE() 나 WRITE_ONCE() 로 보호되지 않은 메모리 액세스를
458 삭제되었습니다. 오늘날에는 공유된 변수들의 로드를 표시하는 READ_ONCE() 나
581 리눅스 커널 v4.15 기준으로, smp_mb() 가 DEC Alpha 용 READ_ONCE() 코드에
583 전용 코드를 만드는 사람들과 READ_ONCE() 자체를 만드는 사람들 뿐임을 의미합니다.
605 않는 READ_ONCE() 에 해당합니다.
[all …]
/linux-6.6.21/io_uring/
Dfs.c60 ren->old_dfd = READ_ONCE(sqe->fd); in io_renameat_prep()
61 oldf = u64_to_user_ptr(READ_ONCE(sqe->addr)); in io_renameat_prep()
62 newf = u64_to_user_ptr(READ_ONCE(sqe->addr2)); in io_renameat_prep()
63 ren->new_dfd = READ_ONCE(sqe->len); in io_renameat_prep()
64 ren->flags = READ_ONCE(sqe->rename_flags); in io_renameat_prep()
114 un->dfd = READ_ONCE(sqe->fd); in io_unlinkat_prep()
116 un->flags = READ_ONCE(sqe->unlink_flags); in io_unlinkat_prep()
120 fname = u64_to_user_ptr(READ_ONCE(sqe->addr)); in io_unlinkat_prep()
164 mkd->dfd = READ_ONCE(sqe->fd); in io_mkdirat_prep()
165 mkd->mode = READ_ONCE(sqe->len); in io_mkdirat_prep()
[all …]
Dsync.c32 sync->off = READ_ONCE(sqe->off); in io_sfr_prep()
33 sync->len = READ_ONCE(sqe->len); in io_sfr_prep()
34 sync->flags = READ_ONCE(sqe->sync_range_flags); in io_sfr_prep()
60 sync->flags = READ_ONCE(sqe->fsync_flags); in io_fsync_prep()
64 sync->off = READ_ONCE(sqe->off); in io_fsync_prep()
65 sync->len = READ_ONCE(sqe->len); in io_fsync_prep()
92 sync->off = READ_ONCE(sqe->off); in io_fallocate_prep()
93 sync->len = READ_ONCE(sqe->addr); in io_fallocate_prep()
94 sync->mode = READ_ONCE(sqe->len); in io_fallocate_prep()
Dadvise.c39 ma->addr = READ_ONCE(sqe->addr); in io_madvise_prep()
40 ma->len = READ_ONCE(sqe->len); in io_madvise_prep()
41 ma->advice = READ_ONCE(sqe->fadvise_advice); in io_madvise_prep()
84 fa->offset = READ_ONCE(sqe->off); in io_fadvise_prep()
85 fa->len = READ_ONCE(sqe->len); in io_fadvise_prep()
86 fa->advice = READ_ONCE(sqe->fadvise_advice); in io_fadvise_prep()
Dsplice.c32 sp->len = READ_ONCE(sqe->len); in __io_splice_prep()
33 sp->flags = READ_ONCE(sqe->splice_flags); in __io_splice_prep()
36 sp->splice_fd_in = READ_ONCE(sqe->splice_fd_in); in __io_splice_prep()
43 if (READ_ONCE(sqe->splice_off_in) || READ_ONCE(sqe->off)) in io_tee_prep()
83 sp->off_in = READ_ONCE(sqe->splice_off_in); in io_splice_prep()
84 sp->off_out = READ_ONCE(sqe->off); in io_splice_prep()
Dstatx.c33 sx->dfd = READ_ONCE(sqe->fd); in io_statx_prep()
34 sx->mask = READ_ONCE(sqe->len); in io_statx_prep()
35 path = u64_to_user_ptr(READ_ONCE(sqe->addr)); in io_statx_prep()
36 sx->buffer = u64_to_user_ptr(READ_ONCE(sqe->addr2)); in io_statx_prep()
37 sx->flags = READ_ONCE(sqe->statx_flags); in io_statx_prep()
Dxattr.c56 name = u64_to_user_ptr(READ_ONCE(sqe->addr)); in __io_getxattr_prep()
57 ix->ctx.cvalue = u64_to_user_ptr(READ_ONCE(sqe->addr2)); in __io_getxattr_prep()
58 ix->ctx.size = READ_ONCE(sqe->len); in __io_getxattr_prep()
59 ix->ctx.flags = READ_ONCE(sqe->xattr_flags); in __io_getxattr_prep()
97 path = u64_to_user_ptr(READ_ONCE(sqe->addr3)); in io_getxattr_prep()
159 name = u64_to_user_ptr(READ_ONCE(sqe->addr)); in __io_setxattr_prep()
160 ix->ctx.cvalue = u64_to_user_ptr(READ_ONCE(sqe->addr2)); in __io_setxattr_prep()
162 ix->ctx.size = READ_ONCE(sqe->len); in __io_setxattr_prep()
163 ix->ctx.flags = READ_ONCE(sqe->xattr_flags); in __io_setxattr_prep()
190 path = u64_to_user_ptr(READ_ONCE(sqe->addr3)); in io_setxattr_prep()
/linux-6.6.21/include/net/
Dbusy_poll.h37 return READ_ONCE(sysctl_net_busy_poll); in net_busy_loop_on()
42 return READ_ONCE(sk->sk_ll_usec) && !signal_pending(current); in sk_can_busy_loop()
77 unsigned long bp_usec = READ_ONCE(sysctl_net_busy_poll); in busy_loop_timeout()
93 unsigned long bp_usec = READ_ONCE(sk->sk_ll_usec); in sk_busy_loop_timeout()
108 unsigned int napi_id = READ_ONCE(sk->sk_napi_id); in sk_busy_loop()
112 READ_ONCE(sk->sk_prefer_busy_poll), in sk_busy_loop()
113 READ_ONCE(sk->sk_busy_poll_budget) ?: BUSY_POLL_BUDGET); in sk_busy_loop()
134 if (unlikely(READ_ONCE(sk->sk_napi_id) != skb->napi_id)) in sk_mark_napi_id()
156 if (!READ_ONCE(sk->sk_napi_id)) in __sk_mark_napi_id_once()
/linux-6.6.21/include/linux/
Dsrcutiny.h67 idx = ((READ_ONCE(ssp->srcu_idx) + 1) & 0x2) >> 1; in __srcu_read_lock()
68 WRITE_ONCE(ssp->srcu_lock_nesting[idx], READ_ONCE(ssp->srcu_lock_nesting[idx]) + 1); in __srcu_read_lock()
88 idx = ((data_race(READ_ONCE(ssp->srcu_idx)) + 1) & 0x2) >> 1; in srcu_torture_stats_print()
91 data_race(READ_ONCE(ssp->srcu_lock_nesting[!idx])), in srcu_torture_stats_print()
92 data_race(READ_ONCE(ssp->srcu_lock_nesting[idx])), in srcu_torture_stats_print()
93 data_race(READ_ONCE(ssp->srcu_idx)), in srcu_torture_stats_print()
94 data_race(READ_ONCE(ssp->srcu_idx_max))); in srcu_torture_stats_print()
/linux-6.6.21/Documentation/litmus-tests/locking/
DDCL-broken.litmus21 r0 = READ_ONCE(*flag);
24 r1 = READ_ONCE(*flag);
31 r2 = READ_ONCE(*data);
40 r0 = READ_ONCE(*flag);
43 r1 = READ_ONCE(*flag);
50 r2 = READ_ONCE(*data);
/linux-6.6.21/arch/arm64/include/asm/
Dpreempt.h13 return READ_ONCE(current_thread_info()->preempt.count); in preempt_count()
47 u32 pc = READ_ONCE(current_thread_info()->preempt.count); in __preempt_count_add()
54 u32 pc = READ_ONCE(current_thread_info()->preempt.count); in __preempt_count_sub()
62 u64 pc = READ_ONCE(ti->preempt_count); in __preempt_count_dec_and_test()
74 return !pc || !READ_ONCE(ti->preempt_count); in __preempt_count_dec_and_test()
79 u64 pc = READ_ONCE(current_thread_info()->preempt_count); in should_resched()
/linux-6.6.21/arch/s390/lib/
Dspinlock.c131 old = READ_ONCE(lp->lock); in arch_spin_lock_queued()
168 while (READ_ONCE(node->prev) != NULL) { in arch_spin_lock_queued()
182 old = READ_ONCE(lp->lock); in arch_spin_lock_queued()
202 while ((next = READ_ONCE(node->next)) == NULL) in arch_spin_lock_queued()
218 owner = arch_spin_yield_target(READ_ONCE(lp->lock), NULL); in arch_spin_lock_classic()
258 owner = READ_ONCE(lp->lock); in arch_spin_trylock_retry()
272 while (READ_ONCE(rw->cnts) & 0x10000) in arch_read_lock_wait()
284 while (READ_ONCE(rw->cnts) & 0x10000) in arch_read_lock_wait()
301 old = READ_ONCE(rw->cnts); in arch_write_lock_wait()
317 cpu = READ_ONCE(lp->lock) & _Q_LOCK_CPU_MASK; in arch_spin_relax()
/linux-6.6.21/drivers/net/ethernet/mellanox/mlx4/
Den_port.c165 packets += READ_ONCE(ring->packets); in mlx4_en_fold_software_stats()
166 bytes += READ_ONCE(ring->bytes); in mlx4_en_fold_software_stats()
176 packets += READ_ONCE(ring->packets); in mlx4_en_fold_software_stats()
177 bytes += READ_ONCE(ring->bytes); in mlx4_en_fold_software_stats()
254 sw_rx_dropped += READ_ONCE(ring->dropped); in mlx4_en_DUMP_ETH_STATS()
255 priv->port_stats.rx_chksum_good += READ_ONCE(ring->csum_ok); in mlx4_en_DUMP_ETH_STATS()
256 priv->port_stats.rx_chksum_none += READ_ONCE(ring->csum_none); in mlx4_en_DUMP_ETH_STATS()
257 priv->port_stats.rx_chksum_complete += READ_ONCE(ring->csum_complete); in mlx4_en_DUMP_ETH_STATS()
258 priv->port_stats.rx_alloc_pages += READ_ONCE(ring->rx_alloc_pages); in mlx4_en_DUMP_ETH_STATS()
259 priv->xdp_stats.rx_xdp_drop += READ_ONCE(ring->xdp_drop); in mlx4_en_DUMP_ETH_STATS()
[all …]
/linux-6.6.21/arch/arm64/mm/
Dmmu.c179 pte_t old_pte = READ_ONCE(*ptep); in init_pte()
188 READ_ONCE(pte_val(*ptep)))); in init_pte()
203 pmd_t pmd = READ_ONCE(*pmdp); in alloc_init_cont_pte()
215 pmd = READ_ONCE(*pmdp); in alloc_init_cont_pte()
244 pmd_t old_pmd = READ_ONCE(*pmdp); in init_pmd()
258 READ_ONCE(pmd_val(*pmdp)))); in init_pmd()
264 pmd_val(old_pmd) != READ_ONCE(pmd_val(*pmdp))); in init_pmd()
278 pud_t pud = READ_ONCE(*pudp); in alloc_init_cont_pmd()
293 pud = READ_ONCE(*pudp); in alloc_init_cont_pmd()
321 p4d_t p4d = READ_ONCE(*p4dp); in alloc_init_pud()
[all …]
/linux-6.6.21/arch/s390/include/asm/
Dpreempt.h17 return READ_ONCE(S390_lowcore.preempt_count) & ~PREEMPT_NEED_RESCHED; in preempt_count()
25 old = READ_ONCE(S390_lowcore.preempt_count); in preempt_count_set()
44 return !(READ_ONCE(S390_lowcore.preempt_count) & PREEMPT_NEED_RESCHED); in test_preempt_need_resched()
74 return unlikely(READ_ONCE(S390_lowcore.preempt_count) == in should_resched()
84 return READ_ONCE(S390_lowcore.preempt_count); in preempt_count()
/linux-6.6.21/tools/memory-model/Documentation/
Dlocking.txt38 r0 = READ_ONCE(y);
40 r1 = READ_ONCE(x);
61 r0 = READ_ONCE(y);
63 r1 = READ_ONCE(x);
96 r0 = READ_ONCE(flag);
99 r1 = READ_ONCE(flag);
106 r2 = READ_ONCE(data);
111 READ_ONCE() of "flag" and the READ_ONCE() of "data". Second, there is
124 r1 = READ_ONCE(flag);
131 r2 = READ_ONCE(data);
[all …]
Dcontrol-dependencies.txt15 q = READ_ONCE(a);
17 p = READ_ONCE(b);
25 q = READ_ONCE(a);
28 p = READ_ONCE(b);
35 q = READ_ONCE(a);
40 of ordering. But please note that neither the READ_ONCE() nor the
41 WRITE_ONCE() are optional. Without the READ_ONCE(), the compiler might
55 So don't leave out either the READ_ONCE() or the WRITE_ONCE().
56 In particular, although READ_ONCE() does force the compiler to emit a
62 q = READ_ONCE(a);
[all …]
/linux-6.6.21/drivers/powercap/
Didle_inject.c133 duration_us = READ_ONCE(ii_dev->run_duration_us); in idle_inject_timer_fn()
134 duration_us += READ_ONCE(ii_dev->idle_duration_us); in idle_inject_timer_fn()
161 play_idle_precise(READ_ONCE(ii_dev->idle_duration_us) * NSEC_PER_USEC, in idle_inject_fn()
162 READ_ONCE(ii_dev->latency_us) * NSEC_PER_USEC); in idle_inject_fn()
194 *run_duration_us = READ_ONCE(ii_dev->run_duration_us); in idle_inject_get_duration()
195 *idle_duration_us = READ_ONCE(ii_dev->idle_duration_us); in idle_inject_get_duration()
223 unsigned int idle_duration_us = READ_ONCE(ii_dev->idle_duration_us); in idle_inject_start()
224 unsigned int run_duration_us = READ_ONCE(ii_dev->run_duration_us); in idle_inject_start()
/linux-6.6.21/tools/memory-model/litmus-tests/
DSB+rfionceonce-poonceonces.litmus17 r1 = READ_ONCE(*x);
18 r2 = READ_ONCE(*y);
27 r3 = READ_ONCE(*y);
28 r4 = READ_ONCE(*x);

12345678910>>...53