summaryrefslogtreecommitdiff
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorMohamad Ayyash <mkayyash@google.com>2016-08-25 00:59:21 +0000
committerMohamad Ayyash <mkayyash@google.com>2016-08-25 00:59:21 +0000
commit1c6df5fdcb19a03fb6b652090b4b968a6377fb14 (patch)
treea8de826477d0c56dd83615f2c23eccb95754cc36 /include/linux/blkdev.h
parent8d525c512280bb7d8218fd59c04de985b1886eca (diff)
Revert "Android: MMC/UFS IO Latency Histograms."
This reverts commit 8d525c512280bb7d8218fd59c04de985b1886eca. Change-Id: I69350b98d9de9b1c9f591e03a90f133e328ba72a
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r--include/linux/blkdev.h76
1 files changed, 0 insertions, 76 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index faf2c0093527..c70e3588a48c 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -197,9 +197,6 @@ struct request {
/* for bidi */
struct request *next_rq;
-
- ktime_t lat_hist_io_start;
- int lat_hist_enabled;
};
static inline unsigned short req_get_ioprio(struct request *req)
@@ -1648,79 +1645,6 @@ extern int bdev_write_page(struct block_device *, sector_t, struct page *,
struct writeback_control *);
extern long bdev_direct_access(struct block_device *, sector_t,
void __pmem **addr, unsigned long *pfn, long size);
-
-/*
- * X-axis for IO latency histogram support.
- */
-static const u_int64_t latency_x_axis_us[] = {
- 100,
- 200,
- 300,
- 400,
- 500,
- 600,
- 700,
- 800,
- 900,
- 1000,
- 1200,
- 1400,
- 1600,
- 1800,
- 2000,
- 2500,
- 3000,
- 4000,
- 5000,
- 6000,
- 7000,
- 9000,
- 10000
-};
-
-#define BLK_IO_LAT_HIST_DISABLE 0
-#define BLK_IO_LAT_HIST_ENABLE 1
-#define BLK_IO_LAT_HIST_ZERO 2
-
-struct io_latency_state {
- u_int64_t latency_y_axis_read[ARRAY_SIZE(latency_x_axis_us) + 1];
- u_int64_t latency_reads_elems;
- u_int64_t latency_y_axis_write[ARRAY_SIZE(latency_x_axis_us) + 1];
- u_int64_t latency_writes_elems;
-};
-
-static inline void
-blk_update_latency_hist(struct io_latency_state *s,
- int read,
- u_int64_t delta_us)
-{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(latency_x_axis_us); i++) {
- if (delta_us < (u_int64_t)latency_x_axis_us[i]) {
- if (read)
- s->latency_y_axis_read[i]++;
- else
- s->latency_y_axis_write[i]++;
- break;
- }
- }
- if (i == ARRAY_SIZE(latency_x_axis_us)) {
- /* Overflowed the histogram */
- if (read)
- s->latency_y_axis_read[i]++;
- else
- s->latency_y_axis_write[i]++;
- }
- if (read)
- s->latency_reads_elems++;
- else
- s->latency_writes_elems++;
-}
-
-void blk_zero_latency_hist(struct io_latency_state *s);
-ssize_t blk_latency_hist_show(struct io_latency_state *s, char *buf);
-
#else /* CONFIG_BLOCK */
struct block_device;