From: Paolo Bonzini <pbonzini@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: "Huangweidong (C)" <weidong.huang@huawei.com>,
"gleb@redhat.com" <gleb@redhat.com>,
Radim Krcmar <rkrcmar@redhat.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"Gonglei (Arei)" <arei.gonglei@huawei.com>,
"avi.kivity@gmail.com" <avi.kivity@gmail.com>,
"Herongguang (Stephen)" <herongguang.he@huawei.com>
Subject: Re: [Qemu-devel] [RFC] vhost: Can we change synchronize_rcu to call_rcu in vhost_set_memory() in vhost kernel module?
Date: Mon, 12 May 2014 15:02:03 +0200 [thread overview]
Message-ID: <5370C64B.9080007@redhat.com> (raw)
In-Reply-To: <20140512125323.GA16846@redhat.com>
Il 12/05/2014 14:53, Michael S. Tsirkin ha scritto:
>> > In any case, whether writes synchronize with RCU or bypass it
>> > doesn't change the picture. In either case, writes are ordered
>> > against each other but not against reads. RCU does nothing except
>> > preventing dangling pointer accesses.
>> >
>> > Paolo
> This is the only part I don't get.
> RCU will make sure no VCPUs are running, won't it?
> So it's a kind of full barrier.
The actual point where the new value becomes visible is where the write
happens, not where you do synchronize_rcu. This is the same for both
full-copy of the routing table or overwriting the entry.
However, the delay in servicing an older irqfd write can be arbitrary if
the scheduler decides not to run the irqfd_inject thread. Such an older
write might definitely read a newer routing entry. And that's the
invalid scenario according to the PCI spec.
Paolo
next prev parent reply other threads:[~2014-05-12 13:02 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-09 1:57 [Qemu-devel] [RFC] vhost: Can we change synchronize_rcu to call_rcu in vhost_set_memory() in vhost kernel module? Gonglei (Arei)
2014-05-09 8:14 ` Paolo Bonzini
2014-05-09 9:04 ` Gonglei (Arei)
2014-05-09 9:53 ` Paolo Bonzini
2014-05-12 9:28 ` Gonglei (Arei)
2014-05-12 9:57 ` Paolo Bonzini
2014-05-12 10:08 ` Michael S. Tsirkin
2014-05-12 10:14 ` Paolo Bonzini
2014-05-12 10:18 ` Michael S. Tsirkin
2014-05-12 10:25 ` Paolo Bonzini
2014-05-12 11:07 ` Michael S. Tsirkin
2014-05-12 11:46 ` Paolo Bonzini
2014-05-12 12:12 ` Michael S. Tsirkin
2014-05-12 12:46 ` Paolo Bonzini
2014-05-12 12:53 ` Michael S. Tsirkin
2014-05-12 13:02 ` Paolo Bonzini [this message]
2014-05-12 10:30 ` Michael S. Tsirkin
2014-05-13 7:03 ` Gonglei (Arei)
2014-05-13 8:21 ` Michael S. Tsirkin
2014-05-13 7:01 ` Gonglei (Arei)
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=5370C64B.9080007@redhat.com \
--to=pbonzini@redhat.com \
--cc=arei.gonglei@huawei.com \
--cc=avi.kivity@gmail.com \
--cc=gleb@redhat.com \
--cc=herongguang.he@huawei.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rkrcmar@redhat.com \
--cc=weidong.huang@huawei.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;
as well as URLs for NNTP newsgroup(s).