]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - include/linux/blkdev.h
[PATCH] Update cfq io scheduler to time sliced design
[mirror_ubuntu-zesty-kernel.git] / include / linux / blkdev.h
index b54a0348a8905c78a570272b6b8c9a4c953b3d0b..21a8674cd14998ba69f7599d9daed261fd751c45 100644 (file)
@@ -54,16 +54,23 @@ struct as_io_context {
 
 struct cfq_queue;
 struct cfq_io_context {
-       void (*dtor)(struct cfq_io_context *);
-       void (*exit)(struct cfq_io_context *);
-
-       struct io_context *ioc;
-
        /*
         * circular list of cfq_io_contexts belonging to a process io context
         */
        struct list_head list;
        struct cfq_queue *cfqq;
+       void *key;
+
+       struct io_context *ioc;
+
+       unsigned long last_end_request;
+       unsigned long last_queue;
+       unsigned long ttime_total;
+       unsigned long ttime_samples;
+       unsigned long ttime_mean;
+
+       void (*dtor)(struct cfq_io_context *);
+       void (*exit)(struct cfq_io_context *);
 };
 
 /*
@@ -73,7 +80,9 @@ struct cfq_io_context {
  */
 struct io_context {
        atomic_t refcount;
-       pid_t pid;
+       struct task_struct *task;
+
+       int (*set_ioprio)(struct io_context *, unsigned int);
 
        /*
         * For request batching
@@ -81,8 +90,6 @@ struct io_context {
        unsigned long last_waited; /* Time last woken after wait for request */
        int nr_batch_requests;     /* Number of requests left in the batch */
 
-       spinlock_t lock;
-
        struct as_io_context *aic;
        struct cfq_io_context *cic;
 };
@@ -134,6 +141,8 @@ struct request {
 
        void *elevator_private;
 
+       unsigned short ioprio;
+
        int rq_status;  /* should split this into a few status bits */
        struct gendisk *rq_disk;
        int errors;