Added BFQ IO Scheduler
/include/linux/iocontext.h
blob:4da4a75c3f1e7df3690f83c102bef5cdd824f7b5 -> blob:ed98cb6dc21a72f4f0d623866987a815bf0103cb
--- include/linux/iocontext.h
+++ include/linux/iocontext.h
@@ -1,6 +1,7 @@
#ifndef IOCONTEXT_H
#define IOCONTEXT_H
+#include <linux/bitmap.h>
#include <linux/radix-tree.h>
#include <linux/rcupdate.h>
@@ -30,12 +31,11 @@ struct as_io_context {
sector_t seek_mean;
};
-struct cfq_queue;
struct cfq_io_context {
void *key;
unsigned long dead_key;
- struct cfq_queue *cfqq[2];
+ void *cfqq[2];
struct io_context *ioc;
@@ -60,6 +60,16 @@ struct cfq_io_context {
};
/*
+ * Indexes into the ioprio_changed bitmap. A bit set indicates that
+ * the corresponding I/O scheduler needs to see a ioprio update.
+ */
+enum {
+ IOC_CFQ_IOPRIO_CHANGED,
+ IOC_BFQ_IOPRIO_CHANGED,
+ IOC_IOPRIO_CHANGED_BITS
+};
+
+/*
* I/O subsystem state of the associated processes. It is refcounted
* and kmalloc'ed. These could be shared between processes.
*/
@@ -71,7 +81,7 @@ struct io_context {
spinlock_t lock;
unsigned short ioprio;
- unsigned short ioprio_changed;
+ DECLARE_BITMAP(ioprio_changed, IOC_IOPRIO_CHANGED_BITS);
/*
* For request batching
@@ -82,6 +92,8 @@ struct io_context {
struct as_io_context *aic;
struct radix_tree_root radix_root;
struct hlist_head cic_list;
+ struct radix_tree_root bfq_radix_root;
+ struct hlist_head bfq_cic_list;
void *ioc_data;
};