Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Typedefs | Enumerations | Functions | Variables
blk-iopoll.h File Reference

Go to the source code of this file.

Data Structures

struct  blk_iopoll
 

Typedefs

typedef intblk_iopoll_fn )(struct blk_iopoll *, int)
 

Enumerations

enum  { IOPOLL_F_SCHED = 0, IOPOLL_F_DISABLE = 1 }
 

Functions

void blk_iopoll_sched (struct blk_iopoll *)
 
void blk_iopoll_init (struct blk_iopoll *, int, blk_iopoll_fn *)
 
void blk_iopoll_complete (struct blk_iopoll *)
 
void __blk_iopoll_complete (struct blk_iopoll *)
 
void blk_iopoll_enable (struct blk_iopoll *)
 
void blk_iopoll_disable (struct blk_iopoll *)
 

Variables

int blk_iopoll_enabled
 

Typedef Documentation

typedef int( blk_iopoll_fn)(struct blk_iopoll *, int)

Definition at line 5 of file blk-iopoll.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
IOPOLL_F_SCHED 
IOPOLL_F_DISABLE 

Definition at line 16 of file blk-iopoll.h.

Function Documentation

void __blk_iopoll_complete ( struct blk_iopoll iop)

__blk_iopoll_complete - Mark this as un-polled again : The parent iopoll structure

Description: See blk_iopoll_complete(). This function must be called with interrupts disabled.

Definition at line 52 of file blk-iopoll.c.

void blk_iopoll_complete ( struct blk_iopoll iopoll)

blk_iopoll_complete - Mark this as un-polled again : The parent iopoll structure

Description: If a driver consumes less than the assigned budget in its run of the iopoll handler, it'll end the polled mode by calling this function. The iopoll handler will not be invoked again before blk_iopoll_sched_prep() is called.

Definition at line 70 of file blk-iopoll.c.

void blk_iopoll_disable ( struct blk_iopoll iop)

blk_iopoll_disable - Disable iopoll on this : The parent iopoll structure

Description: Disable io polling and wait for any pending callbacks to have completed.

Definition at line 147 of file blk-iopoll.c.

void blk_iopoll_enable ( struct blk_iopoll iop)

blk_iopoll_enable - Enable iopoll on this : The parent iopoll structure

Description: Enable iopoll on this . Note that the handler run will not be scheduled, it will only mark it as active.

Definition at line 164 of file blk-iopoll.c.

void blk_iopoll_init ( struct blk_iopoll iop,
int  weight,
blk_iopoll_fn poll_fn 
)

blk_iopoll_init - Initialize this : The parent iopoll structure : The default weight (or command completion budget) : The handler to invoke

Description: Initialize this blk_iopoll structure. Before being actively used, the driver must call blk_iopoll_enable().

Definition at line 182 of file blk-iopoll.c.

void blk_iopoll_sched ( struct blk_iopoll iop)

blk_iopoll_sched - Schedule a run of the iopoll handler : The parent iopoll structure

Description: Add this blk_iopoll structure to the pending poll list and trigger the raise of the blk iopoll softirq. The driver must already have gotten a successful return from blk_iopoll_sched_prep() before calling this.

Definition at line 33 of file blk-iopoll.c.

Variable Documentation

int blk_iopoll_enabled

Definition at line 17 of file blk-iopoll.c.