• Thomas Hellstrom (VMware)'s avatar
    drm/vmwgfx: Introduce a huge page aligning TTM range manager · 7546f7ff
    Thomas Hellstrom (VMware) authored
    Using huge page-table entries requires that the physical address of the
    start of a buffer object is huge page size aligned.
    Make a special version of the TTM range manager that accomplishes this,
    but falls back to a smaller page size alignment (PUD->PMD, PMD->NORMAL)
    to avoid eviction.
    If other drivers want to use it in the future, it can be made a
    TTM generic helper. Note that drivers can force eviction for a certain
    alignment by assigning the TTM GPU alignment correspondingly.
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Michal Hocko <mhocko@suse.com>
    Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
    Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
    Cc: Ralph Campbell <rcampbell@nvidia.com>
    Cc: "Jérôme Glisse" <jglisse@redhat.com>
    Cc: "Christian König" <christian.koenig@amd.com>
    Cc: Dan Williams <dan.j.williams@intel.com>
    Signed-off-by: default avatarThomas Hellstrom (VMware) <thomas_os@shipmail.org>
    Reviewed-by: default avatarRoland Scheidegger <sroland@vmware.com>
    Acked-by: default avatarChristian König <christian.koenig@amd.com>
vmwgfx_thp.c 3.84 KB