kernel/rcu/tree_nocb.h
Source file repositories/reference/linux-study-clean/kernel/rcu/tree_nocb.h
File Facts
- System
- Linux kernel
- Corpus path
kernel/rcu/tree_nocb.h- Extension
.h- Size
- 51551 bytes
- Lines
- 1703
- Domain
- Core OS
- Bucket
- Scheduler, Processes, Timers, Sync, And Syscalls
- Inferred role
- Core OS: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
function rcu_current_is_nocb_kthreadfunction wake_upfunction parse_rcu_nocb_pollfunction rcu_nocb_bypass_lockfunction rcu_nocb_bypass_trylockfunction rcu_nocb_bypass_unlockfunction rcu_nocb_lockfunction rcu_nocb_unlockfunction rcu_nocb_unlock_irqrestorefunction rcu_lockdep_assert_cblist_protectedfunction rcu_nocb_gp_cleanupfunction rcu_init_one_nocbfunction nocb_defer_wakeup_cancelfunction __wake_nocb_gpfunction wake_nocb_gpfunction rcu_set_jiffies_lazy_flushfunction rcu_get_jiffies_lazy_flushfunction wake_nocb_gp_deferfunction rcu_nocb_do_flush_bypassfunction rcu_nocb_flush_bypassfunction rcu_nocb_try_flush_bypassfunction nocb_bypass_needs_flushfunction rcu_barrierfunction __call_rcu_nocb_wakefunction call_rcu_nocbfunction nocb_gp_toggle_rdpfunction nocb_gp_sleepfunction nocb_gp_waitfunction rcu_nocb_gp_kthreadfunction nocb_cb_wait_condfunction nocb_cb_waitfunction kthread_parkfunction rcu_seq_donefunction nocb_cb_waitfunction rcu_nocb_need_deferred_wakeupfunction do_nocb_deferred_wakeup_commonfunction do_nocb_deferred_wakeup_timerfunction rcu_nocb_kthreadfunction rcu_nocb_flush_deferred_wakeupfunction rcu_nocb_queue_toggle_rdpfunction rcu_nocb_rdp_deoffload_wait_condfunction rcu_nocb_rdp_deoffloadfunction rcu_nocb_rdp_offload_wait_condfunction rcu_nocb_rdp_offloadfunction rcu_nocb_cpu_toggle_offloadfunction rcu_nocb_cpu_deoffloadfunction rcu_nocb_cpu_offloadfunction lazy_rcu_shrink_count
Annotated Snippet
if (cpulist_parse(++str, rcu_nocb_mask)) {
pr_warn("rcu_nocbs= bad CPU range, all CPUs set\n");
cpumask_setall(rcu_nocb_mask);
}
}
rcu_state.nocb_is_setup = true;
return 1;
}
__setup("rcu_nocbs", rcu_nocb_setup);
static int __init parse_rcu_nocb_poll(char *arg)
{
rcu_nocb_poll = true;
return 1;
}
__setup("rcu_nocb_poll", parse_rcu_nocb_poll);
/*
* Don't bother bypassing ->cblist if the call_rcu() rate is low.
* After all, the main point of bypassing is to avoid lock contention
* on ->nocb_lock, which only can happen at high call_rcu() rates.
*/
static int nocb_nobypass_lim_per_jiffy = 16 * 1000 / HZ;
module_param(nocb_nobypass_lim_per_jiffy, int, 0);
/*
* Acquire the specified rcu_data structure's ->nocb_bypass_lock. If the
* lock isn't immediately available, perform minimal sanity check.
*/
static void rcu_nocb_bypass_lock(struct rcu_data *rdp)
__acquires(&rdp->nocb_bypass_lock)
{
lockdep_assert_irqs_disabled();
if (raw_spin_trylock(&rdp->nocb_bypass_lock))
return;
/*
* Contention expected only when local enqueue collide with
* remote flush from kthreads.
*/
WARN_ON_ONCE(smp_processor_id() != rdp->cpu);
raw_spin_lock(&rdp->nocb_bypass_lock);
}
/*
* Conditionally acquire the specified rcu_data structure's
* ->nocb_bypass_lock.
*/
static bool rcu_nocb_bypass_trylock(struct rcu_data *rdp)
{
lockdep_assert_irqs_disabled();
return raw_spin_trylock(&rdp->nocb_bypass_lock);
}
/*
* Release the specified rcu_data structure's ->nocb_bypass_lock.
*/
static void rcu_nocb_bypass_unlock(struct rcu_data *rdp)
__releases(&rdp->nocb_bypass_lock)
{
lockdep_assert_irqs_disabled();
raw_spin_unlock(&rdp->nocb_bypass_lock);
}
/*
* Acquire the specified rcu_data structure's ->nocb_lock, but only
* if it corresponds to a no-CBs CPU.
*/
static void rcu_nocb_lock(struct rcu_data *rdp)
{
lockdep_assert_irqs_disabled();
if (!rcu_rdp_is_offloaded(rdp))
return;
raw_spin_lock(&rdp->nocb_lock);
}
/*
* Release the specified rcu_data structure's ->nocb_lock, but only
* if it corresponds to a no-CBs CPU.
*/
static void rcu_nocb_unlock(struct rcu_data *rdp)
{
if (rcu_rdp_is_offloaded(rdp)) {
lockdep_assert_irqs_disabled();
raw_spin_unlock(&rdp->nocb_lock);
}
}
/*
* Release the specified rcu_data structure's ->nocb_lock and restore
* interrupts, but only if it corresponds to a no-CBs CPU.
Annotation
- Detected declarations: `function rcu_current_is_nocb_kthread`, `function wake_up`, `function parse_rcu_nocb_poll`, `function rcu_nocb_bypass_lock`, `function rcu_nocb_bypass_trylock`, `function rcu_nocb_bypass_unlock`, `function rcu_nocb_lock`, `function rcu_nocb_unlock`, `function rcu_nocb_unlock_irqrestore`, `function rcu_lockdep_assert_cblist_protected`.
- Atlas domain: Core OS / Scheduler, Processes, Timers, Sync, And Syscalls.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.