include/linux/sunrpc/sched.h
Source file repositories/reference/linux-study-clean/include/linux/sunrpc/sched.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/sunrpc/sched.h- Extension
.h- Size
- 10225 bytes
- Lines
- 318
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/timer.hlinux/ktime.hlinux/sunrpc/types.hlinux/spinlock.hlinux/wait_bit.hlinux/workqueue.hlinux/sunrpc/xdr.h
Detected Declarations
struct rpc_procinfostruct rpc_messagestruct rpc_call_opsstruct rpc_wait_queuestruct rpc_waitstruct rpc_timeoutstruct rpc_taskstruct rpc_call_opsstruct rpc_task_setupstruct rpc_timerstruct rpc_wait_queuestruct netfunction rpc_qnamefunction rpc_assign_waitqueue_namefunction rpc_assign_waitqueue_namefunction rpc_clnt_swap_activatefunction rpc_clnt_swap_deactivate
Annotated Snippet
struct rpc_message {
const struct rpc_procinfo *rpc_proc; /* Procedure information */
void * rpc_argp; /* Arguments */
void * rpc_resp; /* Result */
const struct cred * rpc_cred; /* Credentials */
};
struct rpc_call_ops;
struct rpc_wait_queue;
struct rpc_wait {
struct list_head list; /* wait queue links */
struct list_head links; /* Links to related tasks */
struct list_head timer_list; /* Timer list */
};
/*
* This describes a timeout strategy
*/
struct rpc_timeout {
unsigned long to_initval, /* initial timeout */
to_maxval, /* max timeout */
to_increment; /* if !exponential */
unsigned int to_retries; /* max # of retries */
unsigned char to_exponential;
};
/*
* This is the RPC task struct
*/
struct rpc_task {
atomic_t tk_count; /* Reference count */
int tk_status; /* result of last operation */
struct list_head tk_task; /* global list of tasks */
/*
* callback to be executed after waking up
* action next procedure for async tasks
*/
void (*tk_callback)(struct rpc_task *);
void (*tk_action)(struct rpc_task *);
unsigned long tk_timeout; /* timeout for rpc_sleep() */
unsigned long tk_runstate; /* Task run status */
struct rpc_wait_queue *tk_waitqueue; /* RPC wait queue we're on */
union {
struct work_struct tk_work; /* Async task work queue */
struct rpc_wait tk_wait; /* RPC wait */
} u;
/*
* RPC call state
*/
struct rpc_message tk_msg; /* RPC call info */
void * tk_calldata; /* Caller private data */
const struct rpc_call_ops *tk_ops; /* Caller callbacks */
struct rpc_clnt * tk_client; /* RPC client */
struct rpc_xprt * tk_xprt; /* Transport */
struct rpc_cred * tk_op_cred; /* cred being operated on */
struct rpc_rqst * tk_rqstp; /* RPC request */
struct workqueue_struct *tk_workqueue; /* Normally rpciod, but could
* be any workqueue
*/
ktime_t tk_start; /* RPC task init timestamp */
pid_t tk_owner; /* Process id for batching tasks */
int tk_rpc_status; /* Result of last RPC operation */
unsigned short tk_flags; /* misc flags */
unsigned short tk_timeouts; /* maj timeouts */
unsigned short tk_pid; /* debugging aid */
unsigned char tk_priority : 2,/* Task priority */
tk_garb_retry : 2,
tk_cred_retry : 2;
};
typedef void (*rpc_action)(struct rpc_task *);
struct rpc_call_ops {
void (*rpc_call_prepare)(struct rpc_task *, void *);
void (*rpc_call_done)(struct rpc_task *, void *);
void (*rpc_count_stats)(struct rpc_task *, void *);
void (*rpc_release)(void *);
};
struct rpc_task_setup {
struct rpc_task *task;
Annotation
- Immediate include surface: `linux/timer.h`, `linux/ktime.h`, `linux/sunrpc/types.h`, `linux/spinlock.h`, `linux/wait_bit.h`, `linux/workqueue.h`, `linux/sunrpc/xdr.h`.
- Detected declarations: `struct rpc_procinfo`, `struct rpc_message`, `struct rpc_call_ops`, `struct rpc_wait_queue`, `struct rpc_wait`, `struct rpc_timeout`, `struct rpc_task`, `struct rpc_call_ops`, `struct rpc_task_setup`, `struct rpc_timer`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source 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.