From: Takuya Yoshikawa <takuya.yoshikawa@gmail.com>
To: Christoffer Dall <cdall@cs.columbia.edu>
Cc: kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, nicolas@viennot.biz
Subject: Re: KVM: Questions and comments on make_all_cpus_request
Date: Wed, 16 Jan 2013 22:20:04 +0900 [thread overview]
Message-ID: <20130116222004.3802b85b634966a3e556b97d@gmail.com> (raw)
In-Reply-To: <1358297020-1548-1-git-send-email-cdall@cs.columbia.edu>
On Tue, 15 Jan 2013 19:43:40 -0500
Christoffer Dall <cdall@cs.columbia.edu> wrote:
> @@ -201,9 +222,13 @@ void kvm_flush_remote_tlbs(struct kvm *kvm)
> {
> long dirty_count = kvm->tlbs_dirty;
>
> - smp_mb();
> + smp_mb(); /* TODO: Someone should explain this! */
> if (make_all_cpus_request(kvm, KVM_REQ_TLB_FLUSH))
> ++kvm->stat.remote_tlb_flush;
> + /*
> + * TODO: Someone should explain this, why is it a cmpxchg, what
> + * happens if the dirty is different from dirty_count?
> + */
> cmpxchg(&kvm->tlbs_dirty, dirty_count, 0);
> }
If it's different from the old value, that means another
attempt which forces us to care about TLBs has been done?
So I think making tlbs_dirty 0 is safe only when it's not
changed during executing this function.
Takuya
next prev parent reply other threads:[~2013-01-16 13:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-16 0:43 KVM: Questions and comments on make_all_cpus_request Christoffer Dall
2013-01-16 13:20 ` Takuya Yoshikawa [this message]
2013-01-16 18:19 ` Marcelo Tosatti
2013-01-16 19:26 ` Gleb Natapov
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=20130116222004.3802b85b634966a3e556b97d@gmail.com \
--to=takuya.yoshikawa@gmail.com \
--cc=cdall@cs.columbia.edu \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=nicolas@viennot.biz \
/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