summaryrefslogtreecommitdiffstats
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r--include/linux/blkdev.h26
1 files changed, 18 insertions, 8 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 5c4eee043191..f2c2fc011e6b 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -206,8 +206,18 @@ struct request {
206 struct gendisk *rq_disk; 206 struct gendisk *rq_disk;
207 struct hd_struct *part; 207 struct hd_struct *part;
208 unsigned long start_time; 208 unsigned long start_time;
209 struct blk_issue_stat issue_stat; 209 /* Time that I/O was submitted to the device. */
210 /* Number of scatter-gather DMA addr+len pairs after 210 u64 io_start_time_ns;
211
212#ifdef CONFIG_BLK_WBT
213 unsigned short wbt_flags;
214#endif
215#ifdef CONFIG_BLK_DEV_THROTTLING_LOW
216 unsigned short throtl_size;
217#endif
218
219 /*
220 * Number of scatter-gather DMA addr+len pairs after
211 * physical address coalescing is performed. 221 * physical address coalescing is performed.
212 */ 222 */
213 unsigned short nr_phys_segments; 223 unsigned short nr_phys_segments;
@@ -267,8 +277,8 @@ struct request {
267 277
268#ifdef CONFIG_BLK_CGROUP 278#ifdef CONFIG_BLK_CGROUP
269 struct request_list *rl; /* rl this rq is alloced from */ 279 struct request_list *rl; /* rl this rq is alloced from */
270 unsigned long long start_time_ns; 280 unsigned long long cgroup_start_time_ns;
271 unsigned long long io_start_time_ns; /* when passed to hardware */ 281 unsigned long long cgroup_io_start_time_ns; /* when passed to hardware */
272#endif 282#endif
273}; 283};
274 284
@@ -1797,25 +1807,25 @@ int kblockd_mod_delayed_work_on(int cpu, struct delayed_work *dwork, unsigned lo
1797static inline void set_start_time_ns(struct request *req) 1807static inline void set_start_time_ns(struct request *req)
1798{ 1808{
1799 preempt_disable(); 1809 preempt_disable();
1800 req->start_time_ns = sched_clock(); 1810 req->cgroup_start_time_ns = sched_clock();
1801 preempt_enable(); 1811 preempt_enable();
1802} 1812}
1803 1813
1804static inline void set_io_start_time_ns(struct request *req) 1814static inline void set_io_start_time_ns(struct request *req)
1805{ 1815{
1806 preempt_disable(); 1816 preempt_disable();
1807 req->io_start_time_ns = sched_clock(); 1817 req->cgroup_io_start_time_ns = sched_clock();
1808 preempt_enable(); 1818 preempt_enable();
1809} 1819}
1810 1820
1811static inline uint64_t rq_start_time_ns(struct request *req) 1821static inline uint64_t rq_start_time_ns(struct request *req)
1812{ 1822{
1813 return req->start_time_ns; 1823 return req->cgroup_start_time_ns;
1814} 1824}
1815 1825
1816static inline uint64_t rq_io_start_time_ns(struct request *req) 1826static inline uint64_t rq_io_start_time_ns(struct request *req)
1817{ 1827{
1818 return req->io_start_time_ns; 1828 return req->cgroup_io_start_time_ns;
1819} 1829}
1820#else 1830#else
1821static inline void set_start_time_ns(struct request *req) {} 1831static inline void set_start_time_ns(struct request *req) {}