<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in sysfs-kernel-dmabuf-buffers</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>c715def5 - dma-buf: Delete the DMA-BUF attachment sysfs statistics</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/Documentation/ABI/testing/sysfs-kernel-dmabuf-buffers#c715def5</link>
        <description>dma-buf: Delete the DMA-BUF attachment sysfs statisticsThe DMA-BUF attachment statistics form a subset of the DMA-BUFsysfs statistics that recently merged to the drm-misc tree. They are notUABI yet since they have not merged to the upstream Linux kernel.Since there has been a reported a performance regression due to theoverhead of sysfs directory creation/teardown duringdma_buf_attach()/dma_buf_detach(), this patch deletes the DMA-BUFattachment statistics from sysfs.Fixes: bdb8d06dfefd (&quot;dmabuf: Add the capability to expose DMA-BUF stats in sysfs&quot;)Signed-off-by: Hridya Valsaraju &lt;hridya@google.com&gt;Reviewed-by: Christian K&#246;nig &lt;christian.koenig@amd.com&gt;Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;Link: https://patchwork.freedesktop.org/patch/msgid/20210713040742.2680135-1-hridya@google.comSigned-off-by: Christian K&#246;nig &lt;christian.koenig@amd.com&gt;

            List of files:
            /linux-6.15/Documentation/ABI/testing/sysfs-kernel-dmabuf-buffers</description>
        <pubDate>Tue, 13 Jul 2021 04:07:38 +0000</pubDate>
        <dc:creator>Hridya Valsaraju &lt;hridya@google.com&gt;</dc:creator>
    </item>
<item>
        <title>bdb8d06d - dmabuf: Add the capability to expose DMA-BUF stats in sysfs</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/Documentation/ABI/testing/sysfs-kernel-dmabuf-buffers#bdb8d06d</link>
        <description>dmabuf: Add the capability to expose DMA-BUF stats in sysfsOverview========The patch adds DMA-BUF statistics to /sys/kernel/dmabuf/buffers. Itallows statistics to be enabled for each DMA-BUF in sysfs by enablingthe config CONFIG_DMABUF_SYSFS_STATS.The following stats will be exposed by the interface:/sys/kernel/dmabuf/buffers/&lt;inode_number&gt;/exporter_name/sys/kernel/dmabuf/buffers/&lt;inode_number&gt;/size/sys/kernel/dmabuf/buffers/&lt;inode_number&gt;/attachments/&lt;attach_uid&gt;/device/sys/kernel/dmabuf/buffers/&lt;inode_number&gt;/attachments/&lt;attach_uid&gt;/map_counterThe inode_number is unique for each DMA-BUF and was added earlier [1]in order to allow userspace to track DMA-BUF usage across differentprocesses.Use Cases=========The interface provides a way to gather DMA-BUF per-buffer statisticsfrom production devices. These statistics will be used to derive DMA-BUFper-exporter stats and per-device usage stats for Android Bug reports.The corresponding userspace changes can be found at [2].Telemetry tools will also capture this information(along with othermemory metrics) periodically as well as on important events like aforeground app kill (which might have been triggered by Low MemoryKiller). It will also contribute to provide a snapshot of the systemmemory usage on other events such as OOM kills and Application NotResponding events.Background==========Currently, there are two existing interfaces that provide informationabout DMA-BUFs.1) /sys/kernel/debug/dma_buf/bufinfodebugfs is however unsuitable to be mounted in production systems andcannot be considered as an alternative to the sysfs interface beingproposed.2) proc/&lt;pid&gt;/fdinfo/&lt;fd&gt;The proc/&lt;pid&gt;/fdinfo/&lt;fd&gt; files expose information about DMA-BUF fds.However, the existing procfs interfaces can only provide informationabout the buffers for which processes hold fds or have the buffersmmapped into their address space. Since the procfs interfaces alonecannot provide a full picture of all DMA-BUFs in the system, there isthe need for an alternate interface to provide this information onproduction systems.The patch contains the following major improvements over v1:1) Each attachment is represented by its own directory to allow creatinga symlink to the importing device and to also provide room for futureexpansion.2) The number of distinct mappings of each attachment is exposed in aseparate file.3) The per-buffer statistics are now in /sys/kernel/dmabuf/buffersinorder to make the interface expandable in future.All of the improvements above are based on suggestions/feedback fromDaniel Vetter and Christian K&#246;nig.A shell script that can be run on a classic Linux environment to readout the DMA-BUF statistics can be found at [3](suggested by JohnStultz).[1]: https://lore.kernel.org/patchwork/patch/1088791/[2]: https://android-review.googlesource.com/q/topic:%22dmabuf-sysfs%22+(status:open%20OR%20status:merged)[3]: https://android-review.googlesource.com/c/platform/system/memory/libmeminfo/+/1549734Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;Signed-off-by: Hridya Valsaraju &lt;hridya@google.com&gt;Reported-by: kernel test robot &lt;lkp@intel.com&gt;Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;Link: https://patchwork.freedesktop.org/patch/msgid/20210603214758.2955251-1-hridya@google.com

            List of files:
            /linux-6.15/Documentation/ABI/testing/sysfs-kernel-dmabuf-buffers</description>
        <pubDate>Thu, 03 Jun 2021 21:47:51 +0000</pubDate>
        <dc:creator>Hridya Valsaraju &lt;hridya@google.com&gt;</dc:creator>
    </item>
</channel>
</rss>
