Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
blk-iopoll.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/bio.h>
#include <linux/blkdev.h>
#include <linux/interrupt.h>
#include <linux/cpu.h>
#include <linux/blk-iopoll.h>
#include <linux/delay.h>
#include "blk.h"

Go to the source code of this file.

Functions

 EXPORT_SYMBOL (blk_iopoll_enabled)
 
void blk_iopoll_sched (struct blk_iopoll *iop)
 
 EXPORT_SYMBOL (blk_iopoll_sched)
 
void __blk_iopoll_complete (struct blk_iopoll *iop)
 
 EXPORT_SYMBOL (__blk_iopoll_complete)
 
void blk_iopoll_complete (struct blk_iopoll *iopoll)
 
 EXPORT_SYMBOL (blk_iopoll_complete)
 
void blk_iopoll_disable (struct blk_iopoll *iop)
 
 EXPORT_SYMBOL (blk_iopoll_disable)
 
void blk_iopoll_enable (struct blk_iopoll *iop)
 
 EXPORT_SYMBOL (blk_iopoll_enable)
 
void blk_iopoll_init (struct blk_iopoll *iop, int weight, blk_iopoll_fn *poll_fn)
 
 EXPORT_SYMBOL (blk_iopoll_init)
 
 subsys_initcall (blk_iopoll_setup)
 

Variables

int blk_iopoll_enabled = 1
 

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.

EXPORT_SYMBOL ( blk_iopoll_enabled  )
EXPORT_SYMBOL ( blk_iopoll_sched  )
EXPORT_SYMBOL ( __blk_iopoll_complete  )
EXPORT_SYMBOL ( blk_iopoll_complete  )
EXPORT_SYMBOL ( blk_iopoll_disable  )
EXPORT_SYMBOL ( blk_iopoll_enable  )
EXPORT_SYMBOL ( blk_iopoll_init  )
subsys_initcall ( blk_iopoll_setup  )

Variable Documentation

int blk_iopoll_enabled = 1

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