The reason for this work is to keep GEM shmem pages mapped and allocated
even while the BO is neither mapped nor pinned. As it is now, GEM SHMEM
creates and releases pages on each pin and unpin, and maps and unmaps
memory ranges on each vmap and vunmap. It's all wasteful. Only the
first pin and vmap calls should establish pages and mappings and only
the purge and free functions should release them.
Hm, aren't maps and pins already refcounted?
The patchset adds new helpers for BO purging to struct
drm_gem_object_funcs. With this, I think it might be possible to have
one global DRM shrinker and let it handle all BOs; independent of each
BO's memory manager.
Thank you, I'll give it a try.
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature