Linux Kernel
3.7.1
|
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/mempool.h>
#include <linux/smp.h>
#include <linux/spinlock.h>
#include <linux/mutex.h>
#include <linux/freezer.h>
#include <linux/sunrpc/clnt.h>
#include "sunrpc.h"
#include <trace/events/sunrpc.h>
Go to the source code of this file.
Macros | |
#define | CREATE_TRACE_POINTS |
#define | RPC_BUFFER_MAXSIZE (2048) |
#define | RPC_BUFFER_POOLSIZE (8) |
#define | RPC_TASK_POOLSIZE (8) |
Variables | |
struct workqueue_struct * | rpciod_workqueue |
EXPORT_SYMBOL_GPL | ( | rpc_init_priority_wait_queue | ) |
EXPORT_SYMBOL_GPL | ( | rpc_init_wait_queue | ) |
EXPORT_SYMBOL_GPL | ( | rpc_destroy_wait_queue | ) |
EXPORT_SYMBOL_GPL | ( | __rpc_wait_for_completion_task | ) |
EXPORT_SYMBOL_GPL | ( | rpc_sleep_on | ) |
EXPORT_SYMBOL_GPL | ( | rpc_queue_empty | ) |
EXPORT_SYMBOL_GPL | ( | rpc_wake_up_queued_task | ) |
EXPORT_SYMBOL_GPL | ( | rpc_wake_up_first | ) |
EXPORT_SYMBOL_GPL | ( | rpc_wake_up_next | ) |
EXPORT_SYMBOL_GPL | ( | rpc_wake_up | ) |
EXPORT_SYMBOL_GPL | ( | rpc_wake_up_status | ) |
EXPORT_SYMBOL_GPL | ( | rpc_delay | ) |
EXPORT_SYMBOL_GPL | ( | rpc_exit | ) |
EXPORT_SYMBOL_GPL | ( | rpc_malloc | ) |
EXPORT_SYMBOL_GPL | ( | rpc_free | ) |
EXPORT_SYMBOL_GPL | ( | rpc_put_task | ) |
EXPORT_SYMBOL_GPL | ( | rpc_put_task_async | ) |
void rpc_destroy_wait_queue | ( | struct rpc_wait_queue * | queue | ) |
void rpc_init_priority_wait_queue | ( | struct rpc_wait_queue * | queue, |
const char * | qname | ||
) |
void rpc_init_wait_queue | ( | struct rpc_wait_queue * | queue, |
const char * | qname | ||
) |
rpc_malloc - allocate an RPC buffer : RPC task that will use this buffer : requested byte size
To prevent rpciod from hanging, this allocator never sleeps, returning NULL if the request cannot be serviced immediately. The caller can arrange to sleep in a way that is safe for rpciod.
Most requests are 'small' (under 2KiB) and can be serviced from a mempool, ensuring that NFS reads and writes can always proceed, and that there is good locality of reference for these buffers.
In order to avoid memory starvation triggering more writebacks of NFS requests, we avoid using GFP_KERNEL.
|
read |
int rpc_queue_empty | ( | struct rpc_wait_queue * | queue | ) |
void rpc_release_calldata | ( | const struct rpc_call_ops * | ops, |
void * | calldata | ||
) |
void rpc_sleep_on | ( | struct rpc_wait_queue * | q, |
struct rpc_task * | task, | ||
rpc_action | action | ||
) |
void rpc_sleep_on_priority | ( | struct rpc_wait_queue * | q, |
struct rpc_task * | task, | ||
rpc_action | action, | ||
int | priority | ||
) |
void rpc_wake_up | ( | struct rpc_wait_queue * | queue | ) |
rpc_wake_up - wake up all rpc_tasks : rpc_wait_queue on which the tasks are sleeping
Grabs queue->lock
|
read |
void rpc_wake_up_queued_task | ( | struct rpc_wait_queue * | queue, |
struct rpc_task * | task | ||
) |
void rpc_wake_up_status | ( | struct rpc_wait_queue * | queue, |
int | status | ||
) |
rpc_wake_up_status - wake up all rpc_tasks and set their status value. : rpc_wait_queue on which the tasks are sleeping : status value to set
Grabs queue->lock
struct workqueue_struct* rpciod_workqueue |