From: Maarten Lankhorst <maarten.lankhorst@canonical.com>
To: nouveau@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/nouveau: fix takedown in move_notify
Date: Wed, 21 Nov 2012 15:13:12 +0100 [thread overview]
Message-ID: <50ACE178.9090707@canonical.com> (raw)
In-Reply-To: <50ACD3F5.6010007@canonical.com>
Op 21-11-12 14:15, Maarten Lankhorst schreef:
> With this fix, nouveau_gem_object_close can be safely changed to a noop,
> forcing the vm bindings to be removed when the original object is. This
> is not done in this patch since it may lead to the object staying mapped
> in the vm space until the gem object refcount drops to 0. This shouldn't
> be a big issue however.
>
> If we choose to do so does allow us to use ttm's delayed destruction
> mechanism to unmap vm after object is idle, resulting in ioread32 no
> longer taking up 30% of cpu in Team Fortress 2 if I don't do the vma
> unmap in nouveau_gem_object_close.
And for those crazy enough to try, deliberately in the most hacky form possible:
drm/nouveau: use ttm delayed destroy for unmapping vm
According to perf top, drops ioread32 from taking 30% cpu to 3% cpu..
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c
index 5e2f521..bdb99ab 100644
--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
@@ -111,7 +111,7 @@ nouveau_gem_object_close(struct drm_gem_object *gem, struct drm_file *file_priv)
struct nouveau_vma *vma;
int ret;
- if (!cli->base.vm)
+// if (!cli->base.vm)
return;
ret = ttm_bo_reserve(&nvbo->bo, false, false, false, 0);
next prev parent reply other threads:[~2012-11-21 14:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-21 13:15 [PATCH] drm/nouveau: fix takedown in move_notify Maarten Lankhorst
2012-11-21 14:13 ` Maarten Lankhorst [this message]
[not found] ` <50ACD3F5.6010007-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2012-12-10 16:39 ` Emil Velikov
2012-12-10 18:15 ` [Nouveau] " Maarten Lankhorst
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=50ACE178.9090707@canonical.com \
--to=maarten.lankhorst@canonical.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=nouveau@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox