Thread (3 messages) 3 messages, 2 authors, 2020-12-23

Re: [RFC v2 01/13] mm: export zap_page_range() for driver use

From: Yongji Xie <hidden>
Date: 2020-12-23 06:33:16
Also in: kvm, linux-fsdevel, linux-mm

On Tue, Dec 22, 2020 at 11:44 PM Christoph Hellwig [off-list ref] wrote:
On Tue, Dec 22, 2020 at 10:52:09PM +0800, Xie Yongji wrote:
quoted
Export zap_page_range() for use in VDUSE.
Err, no.  This has absolutely no business being used by drivers.
Now I want to map/unmap some pages in an userland vma dynamically. The
vm_insert_page() is being used for mapping. In the unmapping case, it
looks like the zap_page_range() does what I want. So I export it.
Otherwise, we need some ways to notify userspace to trigger it with
madvise(MADV_DONTNEED), which might not be able to meet all our needs.
For example, unmapping some pages in a memory shrinker function.

So I'd like to know what's the limitation to use zap_page_range() in a
module. And if we can't use it in a module, is there any acceptable
way to achieve that?

Thanks.
Yongji
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help