From: Paul Mackerras <paulus@samba.org>
To: Alexander Graf <agraf@suse.de>
Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org
Subject: Re: [PATCH 2/4] KVM: PPC: Book3S HV: Add a mechanism for recording modified HPTEs
Date: Tue, 20 Nov 2012 10:25:17 +1100 [thread overview]
Message-ID: <20121119232517.GA30665@drongo> (raw)
In-Reply-To: <7B2C8404-8556-4A64-A20A-BDB85F22B94D@suse.de>
On Mon, Nov 19, 2012 at 01:36:42PM +0100, Alexander Graf wrote:
>
> Aren't atomic reads expensive? Doing one on every guest HPTE modification (when nobody is listening) sounds quite excessive. Wouldn't it be cheaper to just always update the bit?
As Scott said, it's just an ordinary load. The reason for not setting
the bit always is to make the first pass of reading the HPT quicker.
That first pass sends all HPTEs, and clears the modified bits of any
HPTEs that have it set. If the modified bit is set, we have to lock
the HPTE in order to clear the modified bit, even if the HPTE is
invalid, whereas we don't have to lock invalid HPTEs if they don't
have the modified bit set.
> It probably makes sense to make this a RESERVED mask, so that if we ever want to use another bit for host information, we can just add that to the respective mask. Also, you should probably clear the reserved bits (or bail out when set) on h_enter.
OK, and yes good point about clearing the reserved bits on H_ENTER.
Regards,
Paul.
next prev parent reply other threads:[~2012-11-20 0:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-14 4:30 [PATCH 0/4] KVM: PPC: Book3S HV: HPT read/write functions for userspace Paul Mackerras
2012-11-14 4:31 ` [PATCH 1/4] KVM: PPC: Book3S HV: Restructure HPT entry creation code Paul Mackerras
2012-11-19 12:54 ` Alexander Graf
2012-11-14 4:32 ` [PATCH 2/4] KVM: PPC: Book3S HV: Add a mechanism for recording modified HPTEs Paul Mackerras
2012-11-19 12:36 ` Alexander Graf
2012-11-19 17:20 ` Scott Wood
2012-11-19 17:40 ` Alexander Graf
2012-11-19 23:25 ` Paul Mackerras [this message]
2012-11-14 4:32 ` [PATCH 3/4] KVM: PPC: Book3S HV: Make a HPTE removal function available Paul Mackerras
2012-11-14 4:33 ` [PATCH 4/4] KVM: PPC: Book3S HV: Provide a method for userspace to read and write the HPT Paul Mackerras
2012-11-19 12:53 ` Alexander Graf
2012-11-19 23:59 ` Paul Mackerras
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=20121119232517.GA30665@drongo \
--to=paulus@samba.org \
--cc=agraf@suse.de \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.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).