After the recent timeout handling changes, we have two holes in the struct. Move the timeout near the deadline, killing both, and moving related members closer together. On my config on x86-64, this shrinks struct request from 312 to 304 bytes.
Unified · Split
| @@ -237,8 +237,6 @@ struct request { · 236 unmodified lines | |||
| 237 | unsigned short write_hint; | 237 | unsigned short write_hint; |
| 238 | unsigned short ioprio; | 238 | unsigned short ioprio; |
| 239 | 239 | ||
| 240 | unsigned int timeout; | ||
| 241 | |||
| 242 | void *special; /* opaque pointer available for LLD use */ | 240 | void *special; /* opaque pointer available for LLD use */ |
| 243 | 241 | ||
| 244 | unsigned int extra_len; /* length of alignment and padding */ | 242 | unsigned int extra_len; /* length of alignment and padding */ |
| @@ -246,6 +244,8 @@ struct request { · 1 unmodified line | |||
| 246 | enum mq_rq_state state; | 244 | enum mq_rq_state state; |
| 247 | refcount_t ref; | 245 | refcount_t ref; |
| 248 | 246 | ||
| 247 | unsigned int timeout; | ||
| 248 | |||
| 249 | /* access through blk_rq_set_deadline, blk_rq_deadline */ | 249 | /* access through blk_rq_set_deadline, blk_rq_deadline */ |
| 250 | unsigned long __deadline; | 250 | unsigned long __deadline; |
| 251 | 251 | ||