From: Christoffer Dall <christoffer.dall@arm.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org
Subject: Re: Reference count on pages held in secondary MMUs
Date: Tue, 11 Jun 2019 13:21:58 +0200 [thread overview]
Message-ID: <20190611112158.GA5318@e113682-lin.lund.arm.com> (raw)
In-Reply-To: <3ca445bb-0f48-3e39-c371-dd197375c966@redhat.com>
On Sun, Jun 09, 2019 at 11:37:19AM +0200, Paolo Bonzini wrote:
> On 09/06/19 10:18, Christoffer Dall wrote:
> > In some sense, we are thus maintaining a 'hidden', or internal,
> > reference to the page, which is not counted anywhere.
> >
> > I am wondering if it would be equally valid to take a reference on the
> > page, and remove that reference when unmapping via MMU notifiers, and if
> > so, if there would be any advantages/drawbacks in doing so?
>
> If I understand correctly, I think the MMU notifier would not fire if
> you took an actual reference; the page would be pinned in memory and
> could not be swapped out.
>
That was my understanding too, but I can't find the code path that would
support this theory.
The closest thing I could find was is_page_cache_freeable(), and as far
as I'm able to understand that code, that is called (via pageout()) later in
shrink_page_list() than try_to_unmap() which fires the MMU notifiers
through the rmap code.
It is entirely possible that I'm looking at the wrong place and missing
something overall though?
Thanks,
Christoffer
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
next prev parent reply other threads:[~2019-06-11 11:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-09 8:18 Reference count on pages held in secondary MMUs Christoffer Dall
2019-06-09 9:37 ` Paolo Bonzini
2019-06-09 17:40 ` Andrea Arcangeli
2019-06-11 11:51 ` Christoffer Dall
2019-06-22 19:11 ` Andrea Arcangeli
2019-06-26 12:16 ` Christoffer Dall
2019-06-11 11:21 ` Christoffer Dall [this message]
2019-06-11 11:29 ` Paolo Bonzini
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=20190611112158.GA5318@e113682-lin.lund.arm.com \
--to=christoffer.dall@arm.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=pbonzini@redhat.com \
/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