Add a new sysfs group which has nodes to monitor data/request transfer
performance. This sysfs group has nodes showing total sectors/requests
transferred, total busy time spent and max/min/avg/sum latencies.

Signed-off-by: Can Guo <c...@codeaurora.org>
---
 Documentation/ABI/testing/sysfs-driver-ufs | 126 +++++++++++++++++++++++++++++
 1 file changed, 126 insertions(+)

diff --git a/Documentation/ABI/testing/sysfs-driver-ufs 
b/Documentation/ABI/testing/sysfs-driver-ufs
index d1bc23c..8380866 100644
--- a/Documentation/ABI/testing/sysfs-driver-ufs
+++ b/Documentation/ABI/testing/sysfs-driver-ufs
@@ -995,6 +995,132 @@ Description:      This entry shows the target state of an 
UFS UIC link
 
                The file is read only.
 
+What:          /sys/bus/platform/drivers/ufshcd/*/monitor/monitor_enable
+Date:          January 2021
+Contact:       Can Guo <c...@codeaurora.org>
+Description:   This file shows the status of performance monitor enablement
+               and it can be used to start/stop the monitor. When the monitor
+               is stopped, the performance data collected is also cleared.
+
+What:          /sys/bus/platform/drivers/ufshcd/*/monitor/monitor_chunk_size
+Date:          January 2021
+Contact:       Can Guo <c...@codeaurora.org>
+Description:   This file tells the monitor to focus on requests transferring
+               data of specific chunk size (in Bytes). 0 means any chunk size.
+               It can only be changed when monitor is disabled.
+
+What:          /sys/bus/platform/drivers/ufshcd/*/monitor/read_total_sectors
+Date:          January 2021
+Contact:       Can Guo <c...@codeaurora.org>
+Description:   This file shows how many sectors (in 512 Bytes) have been
+               sent from device to host after monitor gets started.
+
+               The file is read only.
+
+What:          /sys/bus/platform/drivers/ufshcd/*/monitor/read_total_busy
+Date:          January 2021
+Contact:       Can Guo <c...@codeaurora.org>
+Description:   This file shows how long (in micro seconds) has been spent
+               sending data from device to host after monitor gets started.
+
+               The file is read only.
+
+What:          /sys/bus/platform/drivers/ufshcd/*/monitor/read_nr_requests
+Date:          January 2021
+Contact:       Can Guo <c...@codeaurora.org>
+Description:   This file shows how many read requests have been sent after
+               monitor gets started.
+
+               The file is read only.
+
+What:          /sys/bus/platform/drivers/ufshcd/*/monitor/read_req_latency_max
+Date:          January 2021
+Contact:       Can Guo <c...@codeaurora.org>
+Description:   This file shows the maximum latency (in micro seconds) of
+               read requests after monitor gets started.
+
+               The file is read only.
+
+What:          /sys/bus/platform/drivers/ufshcd/*/monitor/read_req_latency_min
+Date:          January 2021
+Contact:       Can Guo <c...@codeaurora.org>
+Description:   This file shows the minimum latency (in micro seconds) of
+               read requests after monitor gets started.
+
+               The file is read only.
+
+What:          /sys/bus/platform/drivers/ufshcd/*/monitor/read_req_latency_avg
+Date:          January 2021
+Contact:       Can Guo <c...@codeaurora.org>
+Description:   This file shows the average latency (in micro seconds) of
+               read requests after monitor gets started.
+
+               The file is read only.
+
+What:          /sys/bus/platform/drivers/ufshcd/*/monitor/read_req_latency_sum
+Date:          January 2021
+Contact:       Can Guo <c...@codeaurora.org>
+Description:   This file shows the total latency (in micro seconds) of
+               read requests sent after monitor gets started.
+
+               The file is read only.
+
+What:          /sys/bus/platform/drivers/ufshcd/*/monitor/write_total_sectors
+Date:          January 2021
+Contact:       Can Guo <c...@codeaurora.org>
+Description:   This file shows how many sectors (in 512 Bytes) have been sent
+               from host to device after monitor gets started.
+
+               The file is read only.
+
+What:          /sys/bus/platform/drivers/ufshcd/*/monitor/write_total_busy
+Date:          January 2021
+Contact:       Can Guo <c...@codeaurora.org>
+Description:   This file shows how long (in micro seconds) has been spent
+               sending data from host to device after monitor gets started.
+
+               The file is read only.
+
+What:          /sys/bus/platform/drivers/ufshcd/*/monitor/write_nr_requests
+Date:          January 2021
+Contact:       Can Guo <c...@codeaurora.org>
+Description:   This file shows how many write requests have been sent after
+               monitor gets started.
+
+               The file is read only.
+
+What:          /sys/bus/platform/drivers/ufshcd/*/monitor/write_req_latency_max
+Date:          January 2021
+Contact:       Can Guo <c...@codeaurora.org>
+Description:   This file shows the maximum latency (in micro seconds) of write
+               requests after monitor gets started.
+
+               The file is read only.
+
+What:          /sys/bus/platform/drivers/ufshcd/*/monitor/write_req_latency_min
+Date:          January 2021
+Contact:       Can Guo <c...@codeaurora.org>
+Description:   This file shows the minimum latency (in micro seconds) of write
+               requests after monitor gets started.
+
+               The file is read only.
+
+What:          /sys/bus/platform/drivers/ufshcd/*/monitor/write_req_latency_avg
+Date:          January 2021
+Contact:       Can Guo <c...@codeaurora.org>
+Description:   This file shows the average latency (in micro seconds) of write
+               requests after monitor gets started.
+
+               The file is read only.
+
+What:          /sys/bus/platform/drivers/ufshcd/*/monitor/write_req_latency_sum
+Date:          January 2021
+Contact:       Can Guo <c...@codeaurora.org>
+Description:   This file shows the total latency (in micro seconds) of write
+               requests after monitor gets started.
+
+               The file is read only.
+
 What:          
/sys/bus/platform/drivers/ufshcd/*/device_descriptor/wb_presv_us_en
 Date:          June 2020
 Contact:       Asutosh Das <asuto...@codeaurora.org>
-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux 
Foundation Collaborative Project.

Reply via email to