linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@kernel.org>
To: Peter.Enderborg@sony.com
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	sumit.semwal@linaro.org, christian.koenig@amd.com,
	adobriyan@gmail.com, akpm@linux-foundation.org,
	songmuchun@bytedance.com, guro@fb.com, shakeelb@google.com,
	mhocko@suse.com, neilb@suse.de, samitolvanen@google.com,
	linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linaro-mm-sig@lists.linaro.org, willy@infradead.org
Subject: Re: [PATCH v5] dma-buf: Add DmaBufTotal counter in meminfo
Date: Sun, 25 Apr 2021 10:33:57 +0300	[thread overview]
Message-ID: <YIUbZWm+jW21vYJ9@kernel.org> (raw)
In-Reply-To: <ae091d3d-623b-ce18-e0f2-1591be6db83e@sony.com>

On Thu, Apr 22, 2021 at 02:08:51PM +0000, Peter.Enderborg@sony.com wrote:
> On 4/22/21 10:06 AM, Mike Rapoport wrote:
> > So the flow is like this:
> >
> > * a user has a problem and reports it to an application developer; at best
> >   the user runs simple and limited app to collect some data
> > * if the application developer considers this issue as a system related
> >   they can open adb and collect some more information about the system
> >   using non-root shell with selinux policy restrictions and send this
> >   information to the device manufacturer.
> > * the manufacturer continues to debug the issue and at this point as much
> >   information is possible would have been useful.
> >
> > In this flow I still fail to understand why the manufacturer cannot provide
> > userspace tools that will be able to collect the required information.
> > These tools not necessarily need to target the end user, they may be only
> > intended for the application developers, e.g. policy could allow such tool
> > to access some of the system data only when the system is in developer
> > mode.
> >
> The manufacture is trying to get the tool to work. This is what the
> patch is about. Even for a application developer a commercial
> phone is locked down.

Right, but it's still in full control of the manufacturer what's flashed
there, isn't it?
So there could be some tools that are only available in the developer mode?
These tools could have different permissions etc.

> Many vendors allow that you flash some other software like a AOSP.  But
> that can be very different. Like installing a ubuntu on a PC to debug a
> Fedora issue.
> 
> And sure we can pickup parts of what using the dma-buf. But
> we can not get the total and be sure that is the total without a
> proper counter.

If I understand you correctly, a user space tool that scans fdinfo and
accumulates dma-buf size from there is not accurate enough, that's why an
atomic counter exposed by kernel is a must.

But if the changes in consumption of dma-bufs are that frequent, I cannot
see how a global counter will help to identify an issue.

And if this counter is needed to see if there is a memory leak, summing
sizes of dma-bufs from fdinfo will identify a leak.

What am I missing?

-- 
Sincerely yours,
Mike.

  reply	other threads:[~2021-04-25  7:34 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-17 16:38 [PATCH v5] dma-buf: Add DmaBufTotal counter in meminfo Peter Enderborg
2021-04-20  8:58 ` Daniel Vetter
2021-04-20  9:26   ` Peter.Enderborg
2021-04-20  9:41     ` Mike Rapoport
2021-04-20 10:45       ` Peter.Enderborg
2021-04-20 11:52         ` Mike Rapoport
2021-04-20 12:03           ` Peter.Enderborg
2021-04-20 11:14     ` Daniel Vetter
2021-04-20 11:37       ` Peter.Enderborg
2021-04-21  9:15         ` Daniel Vetter
2021-04-21 10:37           ` Peter.Enderborg
2021-04-21 10:57             ` Michal Hocko
2021-04-21 13:05             ` Pekka Paalanen
2021-04-21 15:31             ` Mike Rapoport
2021-04-21 17:35               ` Peter.Enderborg
2021-04-22  8:06                 ` Mike Rapoport
2021-04-22 14:08                   ` Peter.Enderborg
2021-04-25  7:33                     ` Mike Rapoport [this message]
2021-04-25  8:40                       ` Peter.Enderborg

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=YIUbZWm+jW21vYJ9@kernel.org \
    --to=rppt@kernel.org \
    --cc=Peter.Enderborg@sony.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=guro@fb.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mhocko@suse.com \
    --cc=neilb@suse.de \
    --cc=samitolvanen@google.com \
    --cc=shakeelb@google.com \
    --cc=songmuchun@bytedance.com \
    --cc=sumit.semwal@linaro.org \
    --cc=willy@infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).