From: Paolo Bonzini <pbonzini@redhat.com>
To: Fam Zheng <famz@redhat.com>
Cc: Mike Day <ncmike@ncultra.org>,
qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH 9/9] Convert ram_list to RCU
Date: Wed, 11 Feb 2015 12:19:36 +0100 [thread overview]
Message-ID: <54DB3AC8.80703@redhat.com> (raw)
In-Reply-To: <20150211084721.GD16164@ad.nay.redhat.com>
On 11/02/2015 09:47, Fam Zheng wrote:
>> > + rcu_read_lock();
>> > + block = atomic_rcu_read(&ram_list.mru_block);
>> > if (block && block->host && host - block->host < block->max_length) {
>> > goto found;
>> > }
>> >
>> > - QLIST_FOREACH(block, &ram_list.blocks, next) {
>> > + QLIST_FOREACH_RCU(block, &ram_list.blocks, next) {
>> > /* This case append when the block is not mapped. */
>> > if (block->host == NULL) {
>> > continue;
> }
> if (host - block->host < block->max_length) {
> goto found;
> }
> }
> ////
> return NULL;
>
> Should we call rcu_read_unlock at "////"?
Yes.
Paolo
next prev parent reply other threads:[~2015-02-11 11:19 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-06 16:55 [Qemu-devel] [PATCH v3 0/9] RCUification of the memory API, part 2 Paolo Bonzini
2015-02-06 16:55 ` [Qemu-devel] [PATCH 1/9] exec: introduce cpu_reload_memory_map Paolo Bonzini
2015-02-06 16:55 ` [Qemu-devel] [PATCH 2/9] exec: make iotlb RCU-friendly Paolo Bonzini
2015-02-06 16:55 ` [Qemu-devel] [PATCH 3/9] exec: RCUify AddressSpaceDispatch Paolo Bonzini
2015-02-06 16:55 ` [Qemu-devel] [PATCH 4/9] rcu: prod call_rcu thread when calling synchronize_rcu Paolo Bonzini
2015-02-06 16:55 ` [Qemu-devel] [PATCH 5/9] rcu: introduce RCU-enabled QLIST Paolo Bonzini
2015-02-06 16:55 ` [Qemu-devel] [PATCH 6/9] exec: protect mru_block with RCU Paolo Bonzini
2015-02-11 3:16 ` Fam Zheng
2015-02-06 16:55 ` [Qemu-devel] [PATCH 7/9] cosmetic changes preparing for the following patches Paolo Bonzini
2015-02-11 2:55 ` Fam Zheng
2015-02-06 16:55 ` [Qemu-devel] [PATCH 8/9] exec: convert ram_list to QLIST Paolo Bonzini
2015-02-11 3:28 ` Fam Zheng
2015-02-06 16:55 ` [Qemu-devel] [PATCH 9/9] Convert ram_list to RCU Paolo Bonzini
2015-02-11 8:47 ` Fam Zheng
2015-02-11 11:19 ` Paolo Bonzini [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-02-03 12:52 [Qemu-devel] [PATCH v2 0/9] RCUification of the memory API, part 2 Paolo Bonzini
2015-02-03 12:52 ` [Qemu-devel] [PATCH 9/9] Convert ram_list to RCU 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=54DB3AC8.80703@redhat.com \
--to=pbonzini@redhat.com \
--cc=famz@redhat.com \
--cc=ncmike@ncultra.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@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;
as well as URLs for NNTP newsgroup(s).