Linux Media Controller development
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: "Christian König" <christian.koenig@amd.com>
Cc: Simon Ser <contact@emersion.fr>,
	Pekka Paalanen <ppaalanen@gmail.com>,
	Michal Hocko <mhocko@suse.com>,
	"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
	Szabolcs Nagy <szabolcs.nagy@arm.com>,
	dri-devel@lists.freedesktop.org, Andrei Vagin <avagin@gmail.com>,
	Kalesh Singh <kaleshsingh@google.com>, Hui Su <sh_def@163.com>,
	Michel Lespinasse <walken@google.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	Jeffrey Vander Stoep <jeffv@google.com>,
	Daniel Jordan <daniel.m.jordan@oracle.com>,
	kernel-team <kernel-team@android.com>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	Kees Cook <keescook@chromium.org>, Jann Horn <jannh@google.com>,
	linaro-mm-sig@lists.linaro.org,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Bernd Edlinger <bernd.edlinger@hotmail.de>,
	Suren Baghdasaryan <surenb@google.com>,
	Alexey Gladkov <gladkov.alexey@gmail.com>,
	kernel list <linux-kernel@vger.kernel.org>,
	Minchan Kim <minchan@kernel.org>,
	Yafang Shao <laoar.shao@gmail.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Hridya Valsaraju <hridya@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux API <linux-api@vger.kernel.org>
Subject: Re: [PATCH] procfs/dmabuf: Add /proc/<pid>/task/<tid>/dmabuf_fds
Date: Wed, 3 Feb 2021 11:23:39 +0100	[thread overview]
Message-ID: <YBp5qzLBBMJE0Yhn@phenom.ffwll.local> (raw)
In-Reply-To: <f680ced7-3402-4a1e-4565-35ad7cd0c46d@amd.com>

On Fri, Jan 29, 2021 at 03:22:06PM +0100, Christian König wrote:
> Am 29.01.21 um 15:17 schrieb Simon Ser:
> > On Friday, January 29th, 2021 at 3:13 PM, Pekka Paalanen <ppaalanen@gmail.com> wrote:
> > 
> > > > Re-importing it adds quite a huge CPU overhead to both userspace as well
> > > > as the kernel.
> > > Perhaps, but so far it seems no-one has noticed the overhead, with Mesa
> > > at least.
> > > 
> > > I happily stand corrected.
> > Note, all of this doesn't mean that compositors will stop keeping
> > DMA-BUF FDs around. They may want to keep them open for other purposes
> > like importing them into KMS or other EGL displays as needed.
> 
> Correct and that's a perfectly valid use case. Just re-importing it on every
> frame is something we should really try to avoid.
> 
> At least with debugging enabled it's massive overhead and maybe even
> performance penalty when we have to re-create device page tables all the
> time.
> 
> But thinking more about that it is possible that we short-cut this step as
> long as the original import was still referenced. Otherwise we probably
> would have noticed this much earlier.

Yeah kernel keeps lots of caches around and just gives you back the
previous buffer if it's still around. Still probably not the smartest
idea.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

  parent reply	other threads:[~2021-02-03 10:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-26 22:51 [PATCH] procfs/dmabuf: Add /proc/<pid>/task/<tid>/dmabuf_fds Kalesh Singh
2021-01-27  9:05 ` Michal Hocko
2021-01-27 10:53   ` Christian König
2021-01-27 11:02     ` Michal Hocko
2021-01-27 11:08       ` Christian König
2021-01-27 11:23         ` Michal Hocko
2021-01-27 10:47 ` Jann Horn
2021-01-27 10:57   ` Michal Hocko
2021-01-27 11:01     ` Christian König
2021-01-27 11:27       ` Michal Hocko
2021-01-28 10:01       ` Pekka Paalanen
     [not found]         ` <c95af15d-8ff4-aea0-fa1b-3157845deae1@amd.com>
     [not found]           ` <20210129161334.788b8fd0@eldfell>
     [not found]             ` <wgUb8smQArgjbRFYMPYVDmukBT-_BrqG2M6XIOkWdBcW_x-m4ORnl3VOvH3J4wrsNGMoOXqMAro0UmkdVXFNso9PEiNCFGEeruibhWsmU34=@emersion.fr>
     [not found]               ` <f680ced7-3402-4a1e-4565-35ad7cd0c46d@amd.com>
2021-02-03 10:23                 ` Daniel Vetter [this message]
2021-01-27 17:16   ` Kalesh Singh

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=YBp5qzLBBMJE0Yhn@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=avagin@gmail.com \
    --cc=bernd.edlinger@hotmail.de \
    --cc=christian.koenig@amd.com \
    --cc=contact@emersion.fr \
    --cc=corbet@lwn.net \
    --cc=daniel.m.jordan@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ebiederm@xmission.com \
    --cc=gladkov.alexey@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hridya@google.com \
    --cc=jannh@google.com \
    --cc=jeffv@google.com \
    --cc=kaleshsingh@google.com \
    --cc=keescook@chromium.org \
    --cc=kernel-team@android.com \
    --cc=laoar.shao@gmail.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab+huawei@kernel.org \
    --cc=mhocko@suse.com \
    --cc=minchan@kernel.org \
    --cc=ppaalanen@gmail.com \
    --cc=sh_def@163.com \
    --cc=surenb@google.com \
    --cc=szabolcs.nagy@arm.com \
    --cc=walken@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox