drm/ttm: Work around performance regression with VM_PFNMAP
authorThomas Hellstrom <thellstrom@vmware.com>
Wed, 12 Mar 2014 09:41:32 +0000 (10:41 +0100)
committerThomas Hellstrom <thellstrom@vmware.com>
Wed, 12 Mar 2014 13:07:24 +0000 (14:07 +0100)
commit0e6d6ec02f867fe8d1f785312b7343b21052322f
treede3e45232186d8eac91b34bf4bd2124a371a9749
parent45db98e54242f3ae94bdcfbfe754e743252eb168
drm/ttm: Work around performance regression with VM_PFNMAP

A performance regression was introduced in TTM in linux 3.13 when we started using
VM_PFNMAP for shared mappings. In theory this should've been faster due to
less page book-keeping but it appears like VM_PFNMAP + x86 PAT + write-combine
is a particularly cpu-hungry combination, as seen by largely increased
cpu-usage on r200 GL video playback.

Until we've sorted out why, revert to always use VM_MIXEDMAP.
Reference: freedesktop.org bugzilla bug #75719

Reported-and-tested-by: <smoki00790@gmail.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/ttm/ttm_bo_vm.c