winsys/svga: Enable transhuge pages for buffer objects
authorThomas Hellstrom <thellstrom@vmware.com>
Tue, 21 Jan 2020 09:58:25 +0000 (10:58 +0100)
committerMarge Bot <eric+marge@anholt.net>
Wed, 29 Jan 2020 10:56:06 +0000 (10:56 +0000)
If the kernel supports it, enable transhuge pages for graphics buffer
objects. Except for the syscall itself, this is never expected to cause
any negative performance implications.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3614>

src/gallium/winsys/svga/drm/vmw_screen_ioctl.c

index 4ce953fee8ded20cb1516c3f664f9c5482aa0023..6f987ba059dab9d8ceb93fb51f465273446c3d81 100644 (file)
@@ -694,6 +694,7 @@ vmw_ioctl_region_map(struct vmw_region *region)
         return NULL;
       }
 
+      (void) madvise(map, region->size, MADV_HUGEPAGE);
       region->data = map;
    }