summaryrefslogtreecommitdiff
path: root/include/linux/mmc
diff options
context:
space:
mode:
authorMohan Srinivasan <srmohan@google.com>2016-08-25 18:31:01 -0700
committerMohan Srinivasan <srmohan@google.com>2016-09-06 17:43:28 +0000
commit65733da1dd5c3643e310d371bdb2420a6f3d8e97 (patch)
tree082e008a01cac70fef732ed08300c80cb3ac36de /include/linux/mmc
parent19787e3f1cd696356b4ec02fa3a345dcb4aaf3dc (diff)
Android: MMC/UFS IO Latency Histograms.
This patch adds a new sysfs node (latency_hist) and reports IO (svc time) latency histograms. Disabled by default, can be enabled by echoing 0 into latency_hist, stats can be cleared by writing 2 into latency_hist. This commit fixes the 32 bit build breakage in the previous commit. Tested on both 32 bit and 64 bit arm devices. Bug: 30677035 Change-Id: I9a615a16616d80f87e75676ac4d078a5c429dcf9 Signed-off-by: Mohan Srinivasan <srmohan@google.com>
Diffstat (limited to 'include/linux/mmc')
-rw-r--r--include/linux/mmc/core.h2
-rw-r--r--include/linux/mmc/host.h4
2 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
index 37967b6da03c..3349f0676acb 100644
--- a/include/linux/mmc/core.h
+++ b/include/linux/mmc/core.h
@@ -136,6 +136,8 @@ struct mmc_request {
struct completion completion;
void (*done)(struct mmc_request *);/* completion function */
struct mmc_host *host;
+ ktime_t io_start;
+ int lat_hist_enabled;
};
struct mmc_card;
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 40025b28c1fb..e4862f7cdede 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -16,6 +16,7 @@
#include <linux/sched.h>
#include <linux/device.h>
#include <linux/fault-inject.h>
+#include <linux/blkdev.h>
#include <linux/mmc/core.h>
#include <linux/mmc/card.h>
@@ -379,6 +380,9 @@ struct mmc_host {
} embedded_sdio_data;
#endif
+ int latency_hist_enabled;
+ struct io_latency_state io_lat_s;
+
unsigned long private[0] ____cacheline_aligned;
};