[Freedreno] [Heads-up] drm/msm: msm-next-staging for v5.13
Rob Clark
robdclark at gmail.com
Wed Apr 7 00:35:54 UTC 2021
PSA: msm-next-staging[1] should have more or less what will be in
msm-next for v5.13.
I've done some testing on hw that I have with me, but I don't have
everything, so this is a good time to test and let me know if you have
any issues before the patches are merged. And a good chance to double
check that there isn't something important missing.
Also, I've pulled in (at least for now), the swappable GEM object
support. But compared to the patchset on list, I've flipped the
default to disabled. It can be enabled with msm.enable_eviction=1 in
the kernel cmdline or:
echo 1 > /sys/module/msm/parameters/enable_eviction
It won't do anything without some sort of swap enabled. (On
chromebooks, we use zram swap, that is what I recommend since it is
not nearly as slow as disk backed swap, yet still gives a useful
increase in usable memory.) Since we have a lot of generations of
devices supported, paired with a few different possible iommu's, it
would be helpful if others could try enabling it and report issues.
In the best case, it all "just works"(TM).. otherwise if at least the
iommu is working properly, you may see new iommu faults. In the worst
case if the iommu is not working well, you'll get exciting random
memory corruption! A good way to test is, with something running on
the gpu, run mmm_donut.py[2], ie. something like:
./mmm_donut.py --free_swap=1024 --taste=20 --chew=20
you want the free_swap param to not be more than half your swap size.
You can get a summary of the state of gpu buffers with:
localhost ~ # tail -5 /sys/kernel/debug/dri/1/gem
Total: 5264 objects, 328941568 bytes
Active: 0 objects, 0 bytes
Resident: 11 objects, 8527872 bytes
Purgeable: 44 objects, 5591040 bytes
Purged: 0 objects, 0 bytes
localhost ~ #
Total minus Resident will give a rough idea of what has been unpinned
and swappable.. (it is normal for Resident to be *slightly* less than
Active, because sometimes userspace allocates things that it doesn't
use, or hasn't used yet, and newly allocated GEM objects do not have
pages allocated until first use).
BR,
-R
[1] https://gitlab.freedesktop.org/drm/msm/-/commits/msm-next-staging/
[2] https://chromium.googlesource.com/chromiumos/platform/microbenchmarks/+/refs/heads/main/mmm_donut.py
More information about the Freedreno
mailing list