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); _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel