Thanks again for the reviews!
On Thu, Dec 10, 2020 at 3:03 AM Christian König
<christian.koenig@xxxxxxx> wrote:
Am 10.12.20 um 11:56 schrieb Greg KH:Currently, telemetry tools capture this information(along with other
On Thu, Dec 10, 2020 at 11:27:27AM +0100, Daniel Vetter wrote:Yeah, that is certainly a very valid concern.
On Thu, Dec 10, 2020 at 11:10:45AM +0100, Greg KH wrote:I think the "issue" is that this was a feature from ion that people
On Thu, Dec 10, 2020 at 10:58:50AM +0100, Christian König wrote:This only shows shared memory, so it does smell a lot like $specific_issue
In general a good idea, but I have a few concern/comments here.Production environments seem to want to know who is using up memory :)
Am 10.12.20 um 05:43 schrieb Hridya Valsaraju:
This patch allows statistics to be enabled for each DMA-BUF inMhm, this makes it part of the UAPI. What is the justification for this?
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.
In other words do we really need those debug information in a production
environment?
and we're designing a narrow solution for that and then have to carry it
forever.
"missed" in the dmabuf move. Taking away the ability to see what kind
of allocations were being made didn't make a lot of debugging tools
happy :(
But Hridya knows more, she's been dealing with the transition for a long
time now.
memory metrics) periodically as well as on important events like a
foreground app kill (which might have been triggered by an LMK). We
would also like to get a snapshot of the system memory usage on other
events such as OOM kills and ANRs.
I actually did not know that this is not ok to do. I will change it inSure they are! Just take a look at an attachment:E.g. why is the list of attachments not a sysfs link? That's how weThese aren't struct devices, so I don't understand the objection here.
usually expose struct device * pointers in sysfs to userspace, not as a
list of things.
Where else could these go in sysfs?
struct dma_buf_attachment {
struct dma_buf *dmabuf;
struct device *dev;
This is the struct device which is importing the buffer and the patch in
discussion is just printing the name of this device into sysfs.
the next version of the patch to be sysfs links instead.