All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Daniel Vetter <daniel@ffwll.ch>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] Revert "drm/i915: Disallow pin ioctl completely for kms drivers"
Date: Tue, 25 Nov 2014 14:34:02 +0100	[thread overview]
Message-ID: <20141125133402.GM25711@phenom.ffwll.local> (raw)
In-Reply-To: <20141125120633.GH17410@nuc-i3427.alporthouse.com>

On Tue, Nov 25, 2014 at 12:06:33PM +0000, Chris Wilson wrote:
> On Tue, Nov 25, 2014 at 01:01:39PM +0100, Daniel Vetter wrote:
> > On Tue, Nov 25, 2014 at 11:42:56AM +0000, Chris Wilson wrote:
> > > This reverts commit c211a47c2c28562f8a3fff9e027be1a3ed9e154a.
> > > 
> > > This causes an unwarranteed API break for existing and active userspace.
> > > 
> > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > 
> > Hm, SNA still seems to be able to cope with this and I really don't see
> > the point of keeping this interface going and patching it up. With GEM the
> > kernel should be in control of shared resources, letting userspace in to
> > the game just leads to tears. And we have them now. Keeping pinning around
> > just because we've forgotten to properly disable it was ok with me, but
> > fixing it up when it starts to fall apart really isn't.
> 
> I strongly disagree. It is a powerful tool, equivalent to mlock(), and
> similar to mlock() has its uses.

There's multiple uses for mlock:
- One is preventing swapout for security reasons, and you can do that
  already (hackishly) with mlocking the cpu mmap.
- Another is preventing unbinding from address spaces/movement across numa
  domains, to avoid minor faults overheads. Softpin to avoid relocs sounds
  like the equivalant.

But none of the mlocks allow userspace to fix stuff into a limited shared
global resource like mappable ggtt for i915. A resource which is fully
managed by the kernel (except for pinning) and which can fragment badly.
mlock memory just brings oom a bit nearer (which can be handled with
cgroups and all that), but it doesn't hit fragmentation fun of a global
resource nearby. That is the part of pin I really don't like.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2014-11-25 13:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-25 11:42 [PATCH] Revert "drm/i915: Disallow pin ioctl completely for kms drivers" Chris Wilson
2014-11-25 12:01 ` Daniel Vetter
2014-11-25 12:06   ` Chris Wilson
2014-11-25 13:34     ` Daniel Vetter [this message]
2014-11-25 20:47       ` Chris Wilson
2014-11-26  9:41         ` Daniel Vetter
2014-11-27 13:56 ` Jani Nikula
2014-11-27 14:13   ` Chris Wilson

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=20141125133402.GM25711@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.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 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.