/** * DOC: overview * * ``/sys/kernel/debug/dma_buf/bufinfo`` provides an overview of every DMA-BUF * in the system. However, since debugfs is not safe to be mounted in * production, procfs and sysfs can be used to gather DMA-BUF statistics on * production systems. * * The ``/proc/<pid>/fdinfo/<fd>`` files in procfs can be used to gather * information about DMA-BUF fds. Detailed documentation about the interface * is present in Documentation/filesystems/proc.rst. * * Unfortunately, the existing procfs interfaces can only provide information * about the DMA-BUFs for which processes hold fds or have the buffers mmapped * into their address space. This necessitated the creation of the DMA-BUF sysfs * statistics interface to provide per-buffer information on production systems. * * The interface at ``/sys/kernel/dmabuf/buffers`` exposes information about * every DMA-BUF when ``CONFIG_DMABUF_SYSFS_STATS`` is enabled. * * The following stats are exposed by the interface: * * * ``/sys/kernel/dmabuf/buffers/<inode_number>/exporter_name`` * * ``/sys/kernel/dmabuf/buffers/<inode_number>/size`` * * The information in the interface can also be used to derive per-exporter * statistics. The data from the interface can be gathered on error conditions * or other important events to provide a snapshot of DMA-BUF usage. * It can also be collected periodically by telemetry to monitor various metrics. * * Detailed documentation about the interface is present in * Documentation/ABI/testing/sysfs-kernel-dmabuf-buffers.
*/
/* create the directory for buffer stats */
ret = kobject_init_and_add(&sysfs_entry->kobj, &dma_buf_ktype, NULL, "%lu", file_inode(file)->i_ino); if (ret) goto err_sysfs_dmabuf;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.