* Re: [RFC v2 01/13] mm: export zap_page_range() for driver use
[not found] ` <20201222145221.711-2-xieyongji@bytedance.com>
@ 2020-12-22 15:44 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2020-12-22 15:44 UTC (permalink / raw)
To: Xie Yongji
Cc: axboe, corbet, kvm, mst, linux-aio, netdev, rdunlap, willy,
virtualization, linux-mm, bcrl, viro, stefanha, linux-fsdevel,
akpm
On Tue, Dec 22, 2020 at 10:52:09PM +0800, Xie Yongji wrote:
> Export zap_page_range() for use in VDUSE.
Err, no. This has absolutely no business being used by drivers.
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [RFC v2 01/13] mm: export zap_page_range() for driver use
[not found] <CACycT3vevQQ8cGK_ac-1oyCb9+YPSAhLMue=4J3=2HzXVK7XHw@mail.gmail.com>
@ 2020-12-23 8:13 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2020-12-23 8:13 UTC (permalink / raw)
To: Yongji Xie
Cc: axboe, corbet, kvm, Michael S. Tsirkin, linux-aio, netdev,
Randy Dunlap, Matthew Wilcox, virtualization, Christoph Hellwig,
linux-mm, bcrl, viro, Stefan Hajnoczi, linux-fsdevel, akpm
On Wed, Dec 23, 2020 at 02:32:07PM +0800, Yongji Xie wrote:
> 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?
I think the anser is: don't play funny games with unmapped outside of
munmap. Especially as synchronization is very hard to get right.
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-23 8:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CACycT3vevQQ8cGK_ac-1oyCb9+YPSAhLMue=4J3=2HzXVK7XHw@mail.gmail.com>
2020-12-23 8:13 ` [RFC v2 01/13] mm: export zap_page_range() for driver use Christoph Hellwig
[not found] <20201222145221.711-1-xieyongji@bytedance.com>
[not found] ` <20201222145221.711-2-xieyongji@bytedance.com>
2020-12-22 15:44 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).