Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
deadline-iosched.c File Reference
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/blkdev.h>
#include <linux/elevator.h>
#include <linux/bio.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/compiler.h>
#include <linux/rbtree.h>

Go to the source code of this file.

Data Structures

struct  deadline_data
 

Macros

#define SHOW_FUNCTION(__FUNC, __VAR, __CONV)
 
#define STORE_FUNCTION(__FUNC, __PTR, MIN, MAX, __CONV)
 
#define DD_ATTR(name)
 

Functions

 SHOW_FUNCTION (deadline_read_expire_show, dd->fifo_expire[READ], 1)
 
 SHOW_FUNCTION (deadline_write_expire_show, dd->fifo_expire[WRITE], 1)
 
 SHOW_FUNCTION (deadline_writes_starved_show, dd->writes_starved, 0)
 
 SHOW_FUNCTION (deadline_front_merges_show, dd->front_merges, 0)
 
 SHOW_FUNCTION (deadline_fifo_batch_show, dd->fifo_batch, 0)
 
 STORE_FUNCTION (deadline_read_expire_store,&dd->fifo_expire[READ], 0, INT_MAX, 1)
 
 STORE_FUNCTION (deadline_write_expire_store,&dd->fifo_expire[WRITE], 0, INT_MAX, 1)
 
 STORE_FUNCTION (deadline_writes_starved_store,&dd->writes_starved, INT_MIN, INT_MAX, 0)
 
 STORE_FUNCTION (deadline_front_merges_store,&dd->front_merges, 0, 1, 0)
 
 STORE_FUNCTION (deadline_fifo_batch_store,&dd->fifo_batch, 0, INT_MAX, 0)
 
 module_init (deadline_init)
 
 module_exit (deadline_exit)
 
 MODULE_AUTHOR ("Jens Axboe")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DESCRIPTION ("deadline IO scheduler")
 

Macro Definition Documentation

#define DD_ATTR (   name)
Value:
__ATTR(name, S_IRUGO|S_IWUSR, deadline_##name##_show, \
deadline_##name##_store)

Definition at line 420 of file deadline-iosched.c.

#define SHOW_FUNCTION (   __FUNC,
  __VAR,
  __CONV 
)
Value:
static ssize_t __FUNC(struct elevator_queue *e, char *page) \
{ \
struct deadline_data *dd = e->elevator_data; \
int __data = __VAR; \
if (__CONV) \
__data = jiffies_to_msecs(__data); \
return deadline_var_show(__data, (page)); \
}

Definition at line 381 of file deadline-iosched.c.

#define STORE_FUNCTION (   __FUNC,
  __PTR,
  MIN,
  MAX,
  __CONV 
)
Value:
static ssize_t __FUNC(struct elevator_queue *e, const char *page, size_t count) \
{ \
struct deadline_data *dd = e->elevator_data; \
int __data; \
int ret = deadline_var_store(&__data, (page), count); \
if (__data < (MIN)) \
__data = (MIN); \
else if (__data > (MAX)) \
__data = (MAX); \
if (__CONV) \
*(__PTR) = msecs_to_jiffies(__data); \
else \
*(__PTR) = __data; \
return ret; \
}

Definition at line 397 of file deadline-iosched.c.

Function Documentation

MODULE_AUTHOR ( "Jens Axboe"  )
MODULE_DESCRIPTION ( "deadline IO scheduler )
module_exit ( deadline_exit  )
module_init ( deadline_init  )
MODULE_LICENSE ( "GPL"  )
SHOW_FUNCTION ( deadline_read_expire_show  ,
dd->  fifo_expire[READ],
 
)
SHOW_FUNCTION ( deadline_write_expire_show  ,
dd->  fifo_expire[WRITE],
 
)
SHOW_FUNCTION ( deadline_writes_starved_show  ,
dd->  writes_starved,
 
)
SHOW_FUNCTION ( deadline_front_merges_show  ,
dd->  front_merges,
 
)
SHOW_FUNCTION ( deadline_fifo_batch_show  ,
dd->  fifo_batch,
 
)
STORE_FUNCTION ( deadline_read_expire_store  ,
&dd->  fifo_expire[READ],
,
INT_MAX  ,
 
)
STORE_FUNCTION ( deadline_write_expire_store  ,
&dd->  fifo_expire[WRITE],
,
INT_MAX  ,
 
)
STORE_FUNCTION ( deadline_writes_starved_store  ,
&dd->  writes_starved,
INT_MIN  ,
INT_MAX  ,
 
)
STORE_FUNCTION ( deadline_front_merges_store  ,
&dd->  front_merges,
,
,
 
)
STORE_FUNCTION ( deadline_fifo_batch_store  ,
&dd->  fifo_batch,
,
INT_MAX  ,
 
)