All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Hridya Valsaraju <hridya@google.com>
Cc: surenb@google.com, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	"Christian König" <christian.koenig@amd.com>,
	linaro-mm-sig@lists.linaro.org, kernel-team@android.com,
	linux-media@vger.kernel.org
Subject: Re: [PATCH] dmabuf: Add the capability to expose DMA-BUF stats in sysfs
Date: Thu, 10 Dec 2020 10:45:00 +0100	[thread overview]
Message-ID: <X9HuHFQntOEUNpst@kroah.com> (raw)
In-Reply-To: <20201210044400.1080308-1-hridya@google.com>

On Wed, Dec 09, 2020 at 08:43:57PM -0800, Hridya Valsaraju wrote:
> This patch allows statistics to be enabled for each DMA-BUF in
> sysfs by enabling the config CONFIG_DMABUF_SYSFS_STATS.
> 
> The following stats will be exposed by the interface:
> 
> /sys/kernel/dmabuf/<inode_number>/exporter_name
> /sys/kernel/dmabuf/<inode_number>/size
> /sys/kernel/dmabuf/<inode_number>/dev_map_info
> 
> The inode_number is unique for each DMA-BUF and was added earlier [1]
> in order to allow userspace to track DMA-BUF usage across different
> processes.
> 
> Currently, this information is exposed in
> /sys/kernel/debug/dma_buf/bufinfo.
> However, since debugfs is considered unsafe to be mounted in production,
> it is being duplicated in sysfs.
> 
> This information is intended to help with root-causing
> low-memory kills and the debugging/analysis of other memory-related issues.
> 
> It will also be used to derive DMA-BUF
> per-exporter stats and per-device usage stats for Android Bug reports.
> 
> [1]: https://lore.kernel.org/patchwork/patch/1088791/
> 
> Signed-off-by: Hridya Valsaraju <hridya@google.com>

Thanks for adding all of this, nice work!

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <gregkh@linuxfoundation.org>
To: Hridya Valsaraju <hridya@google.com>
Cc: "Sumit Semwal" <sumit.semwal@linaro.org>,
	"Christian König" <christian.koenig@amd.com>,
	linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
	dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org,
	kernel-team@android.com, surenb@google.com,
	john.stultz@linaro.org
Subject: Re: [PATCH] dmabuf: Add the capability to expose DMA-BUF stats in sysfs
Date: Thu, 10 Dec 2020 10:45:00 +0100	[thread overview]
Message-ID: <X9HuHFQntOEUNpst@kroah.com> (raw)
In-Reply-To: <20201210044400.1080308-1-hridya@google.com>

On Wed, Dec 09, 2020 at 08:43:57PM -0800, Hridya Valsaraju wrote:
> This patch allows statistics to be enabled for each DMA-BUF in
> sysfs by enabling the config CONFIG_DMABUF_SYSFS_STATS.
> 
> The following stats will be exposed by the interface:
> 
> /sys/kernel/dmabuf/<inode_number>/exporter_name
> /sys/kernel/dmabuf/<inode_number>/size
> /sys/kernel/dmabuf/<inode_number>/dev_map_info
> 
> The inode_number is unique for each DMA-BUF and was added earlier [1]
> in order to allow userspace to track DMA-BUF usage across different
> processes.
> 
> Currently, this information is exposed in
> /sys/kernel/debug/dma_buf/bufinfo.
> However, since debugfs is considered unsafe to be mounted in production,
> it is being duplicated in sysfs.
> 
> This information is intended to help with root-causing
> low-memory kills and the debugging/analysis of other memory-related issues.
> 
> It will also be used to derive DMA-BUF
> per-exporter stats and per-device usage stats for Android Bug reports.
> 
> [1]: https://lore.kernel.org/patchwork/patch/1088791/
> 
> Signed-off-by: Hridya Valsaraju <hridya@google.com>

Thanks for adding all of this, nice work!

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

  reply	other threads:[~2020-12-10  9:43 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-10  4:43 [PATCH] dmabuf: Add the capability to expose DMA-BUF stats in sysfs Hridya Valsaraju
2020-12-10  4:43 ` Hridya Valsaraju
2020-12-10  9:45 ` Greg KH [this message]
2020-12-10  9:45   ` Greg KH
2020-12-10  9:58 ` Christian König
2020-12-10  9:58   ` Christian König
2020-12-10 10:10   ` Greg KH
2020-12-10 10:10     ` Greg KH
2020-12-10 10:27     ` Daniel Vetter
2020-12-10 10:27       ` Daniel Vetter
2020-12-10 10:56       ` Greg KH
2020-12-10 10:56         ` Greg KH
2020-12-10 11:02         ` Christian König
2020-12-10 11:02           ` Christian König
2020-12-10 22:41           ` Hridya Valsaraju
2020-12-10 22:41             ` Hridya Valsaraju
2020-12-11  8:03             ` Christian König
2020-12-11  8:03               ` Christian König
2020-12-11 18:30               ` Hridya Valsaraju
2020-12-11 18:30                 ` Hridya Valsaraju
2020-12-10 11:26         ` Daniel Vetter
2020-12-10 11:26           ` Daniel Vetter
2020-12-10 12:07           ` Greg KH
2020-12-10 12:07             ` Greg KH
2020-12-10 13:10             ` Daniel Vetter
2020-12-10 13:10               ` Daniel Vetter
2020-12-11 20:21               ` John Stultz
2020-12-11 20:21                 ` John Stultz
2020-12-10 20:05   ` Hridya Valsaraju
2020-12-10 20:05     ` Hridya Valsaraju

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=X9HuHFQntOEUNpst@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hridya@google.com \
    --cc=kernel-team@android.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=surenb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.