From: Yongji Xie <xieyongji@bytedance.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
Jason Wang <jasowang@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
sgarzare@redhat.com, Parav Pandit <parav@nvidia.com>,
akpm@linux-foundation.org, Randy Dunlap <rdunlap@infradead.org>,
Matthew Wilcox <willy@infradead.org>,
viro@zeniv.linux.org.uk, axboe@kernel.dk, bcrl@kvack.org,
corbet@lwn.net, virtualization@lists.linux-foundation.org,
netdev@vger.kernel.org, kvm@vger.kernel.org, linux-aio@kvack.org,
linux-fsdevel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [RFC v2 01/13] mm: export zap_page_range() for driver use
Date: Wed, 23 Dec 2020 14:32:07 +0800 [thread overview]
Message-ID: <CACycT3vevQQ8cGK_ac-1oyCb9+YPSAhLMue=4J3=2HzXVK7XHw@mail.gmail.com> (raw)
On Tue, Dec 22, 2020 at 11:44 PM Christoph Hellwig <hch@infradead.org> wrote:
>
> 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.
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
next reply other threads:[~2020-12-23 6:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-23 6:32 Yongji Xie [this message]
2020-12-23 8:13 ` [RFC v2 01/13] mm: export zap_page_range() for driver use Christoph Hellwig
2020-12-23 14:21 ` [External] " Yongji Xie
-- strict thread matches above, loose matches on Subject: below --
2020-12-22 14:52 [RFC v2 00/13] Introduce VDUSE - vDPA Device in Userspace Xie Yongji
2020-12-22 14:52 ` [RFC v2 01/13] mm: export zap_page_range() for driver use Xie Yongji
2020-12-22 15:44 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CACycT3vevQQ8cGK_ac-1oyCb9+YPSAhLMue=4J3=2HzXVK7XHw@mail.gmail.com' \
--to=xieyongji@bytedance.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=bcrl@kvack.org \
--cc=corbet@lwn.net \
--cc=hch@infradead.org \
--cc=jasowang@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-aio@kvack.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=parav@nvidia.com \
--cc=rdunlap@infradead.org \
--cc=sgarzare@redhat.com \
--cc=stefanha@redhat.com \
--cc=viro@zeniv.linux.org.uk \
--cc=virtualization@lists.linux-foundation.org \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).