dmabuf: Add the capability to expose DMA-BUF stats in sysfs
[linux-2.6-microblaze.git] / Documentation / ABI / testing / sysfs-kernel-dmabuf-buffers
diff --git a/Documentation/ABI/testing/sysfs-kernel-dmabuf-buffers b/Documentation/ABI/testing/sysfs-kernel-dmabuf-buffers
new file mode 100644 (file)
index 0000000..a243984
--- /dev/null
@@ -0,0 +1,52 @@
+What:          /sys/kernel/dmabuf/buffers
+Date:          May 2021
+KernelVersion: v5.13
+Contact:       Hridya Valsaraju <hridya@google.com>
+Description:   The /sys/kernel/dmabuf/buffers directory contains a
+               snapshot of the internal state of every DMA-BUF.
+               /sys/kernel/dmabuf/buffers/<inode_number> will contain the
+               statistics for the DMA-BUF with the unique inode number
+               <inode_number>
+Users:         kernel memory tuning/debugging tools
+
+What:          /sys/kernel/dmabuf/buffers/<inode_number>/exporter_name
+Date:          May 2021
+KernelVersion: v5.13
+Contact:       Hridya Valsaraju <hridya@google.com>
+Description:   This file is read-only and contains the name of the exporter of
+               the DMA-BUF.
+
+What:          /sys/kernel/dmabuf/buffers/<inode_number>/size
+Date:          May 2021
+KernelVersion: v5.13
+Contact:       Hridya Valsaraju <hridya@google.com>
+Description:   This file is read-only and specifies the size of the DMA-BUF in
+               bytes.
+
+What:          /sys/kernel/dmabuf/buffers/<inode_number>/attachments
+Date:          May 2021
+KernelVersion: v5.13
+Contact:       Hridya Valsaraju <hridya@google.com>
+Description:   This directory will contain subdirectories representing every
+               attachment of the DMA-BUF.
+
+What:          /sys/kernel/dmabuf/buffers/<inode_number>/attachments/<attachment_uid>
+Date:          May 2021
+KernelVersion: v5.13
+Contact:       Hridya Valsaraju <hridya@google.com>
+Description:   This directory will contain information on the attached device
+               and the number of current distinct device mappings.
+
+What:          /sys/kernel/dmabuf/buffers/<inode_number>/attachments/<attachment_uid>/device
+Date:          May 2021
+KernelVersion: v5.13
+Contact:       Hridya Valsaraju <hridya@google.com>
+Description:   This file is read-only and is a symlink to the attached device's
+               sysfs entry.
+
+What:          /sys/kernel/dmabuf/buffers/<inode_number>/attachments/<attachment_uid>/map_counter
+Date:          May 2021
+KernelVersion: v5.13
+Contact:       Hridya Valsaraju <hridya@google.com>
+Description:   This file is read-only and contains a map_counter indicating the
+               number of distinct device mappings of the attachment.