This adds a set of hooks that intercepts the blk-mq path of allocating/inserting/issuing/completing requests, allowing us to develop a scheduler within that framework. We reuse the existing elevator scheduler API on the registration side, but augment that with the scheduler flagging support for the blk-mq interfce, and with a separate set of ops hooks for MQ devices. We split driver and scheduler tags, so we can run the scheduling independently of device queue depth.
Showing the changes to include/linux/blkdev.h (1 of 17 files). Show all
Unified · Split
| @@ -154,6 +154,7 @@ struct request { · 153 unmodified lines | ||
| 154 | 154 | |
| 155 | 155 | /* the following two fields are internal, NEVER access directly */ |
| 156 | 156 | unsigned int __data_len; /* total data len */ |
| 157 | + int tag; | |
| 157 | 158 | sector_t __sector; /* sector cursor */ |
| 158 | 159 | |
| 159 | 160 | struct bio *bio; |
| @@ -220,9 +221,10 @@ struct request { · 60 unmodified lines | ||
| 220 | 221 | |
| 221 | 222 | unsigned short ioprio; |
| 222 | 223 | |
| 224 | + int internal_tag; | |
| 225 | + | |
| 223 | 226 | void *special; /* opaque pointer available for LLD use */ |
| 224 | 227 | |
| 225 | − int tag; | |
| 226 | 228 | int errors; |
| 227 | 229 | |
| 228 | 230 | /* |