mm: introduce MADV_COOL
Quoted 20 lines · On Wed, 29 May 2019 13:05:52 +0800 Michal Hocko wrote:
Quoted 10 lines · Hillf Danton
Quoted 9 lines · On Wed, 29 May 2019 00:11:15 +0800 Michal Hocko wrote:
Quoted 5 lines · Hillf Danton
In short, I prefer to skip IO mapping since any kind of address range can be expected from userspace, and it may probably cover an IO mapping. And things can get out of control, if we reclaim some IO pages while underlying device is trying to fill data into any of them, for instance.
What do you mean by IO pages why what is the actual problem?
Quoted 8 lines
Io pages are the backing-store pages of a mapping whose
vm_flagshasVM_IOset, and the comment inmm/memory.csays:
/*
* Physically remapped pages are special. Tell the
* rest of the world about it:
*VM_IOtells people not to look at these pages
* (accesses can have side effects).
Quoted 3 lines
OK, thanks for the clarification of the first part of the question. Now to the second and the more important one. What is the actual concern? AFAIK those pages shouldn't be on LRU list.
The backing pages for GEM object are lru pages, see the function drm_gem_get_pages() in drivers/gpu/drm/drm_gem.c, please.
Quoted 3 lines
If they are then they should
be safe to get reclaimed otherwise we would have a problem when reclaiming them on the normal memory pressure.
Yes, Sir, they could be swapped out.
Quoted 1 line
Why is this madvise any different?
Now, it is not, thanks to the light you are casting.
BR
Hillf