From: Paolo Bonzini <pbonzini@redhat.com>
To: Mike Day <ncmike@ncultra.org>
Cc: Paul Mckenney <paulmck@linux.vnet.ibm.com>,
Mathew Desnoyers <mathieu.desnoyers@efficios.com>,
qemu-devel@nongnu.org, Anthony Liguori <anthony@codemonkey.ws>
Subject: Re: [Qemu-devel] [RFC PATCH] convert ram_list to RCU DQ
Date: Fri, 30 Aug 2013 10:19:16 +0200 [thread overview]
Message-ID: <52205584.5080509@redhat.com> (raw)
In-Reply-To: <CAGaKXu2vNT5zG5V1NOPQY5qT1=FLhEbVJq6mqVLRREN8QVz0Mg@mail.gmail.com>
Il 29/08/2013 21:18, Mike Day ha scritto:
>
>> Similarly, here the critical section includes the caller, and block is
>> living across calls to host. Again, for now just put all of ram_load
>> under a huge RCU critical section. Later we can use ram_list.version to
>> refresh the list and make the critical sections smaller.
>
> And: rcu_read_lock() and rcu_read_unlock() can be called recursively, so
> I can still leave the lock/unlock pair in host_from_stream_offset.
I'm not sure about that; returning an RCU-protected variable after
rcu_read_unlock() seems wrong to me because the pointer may not be valid
at that point. I suggest using a comment that asks to call
host_from_stream_offset within rcu_read_lock()/rcu_read_unlock().
However, if existing practice in the kernel is different, I'll bow to that.
Paolo
next prev parent reply other threads:[~2013-08-30 8:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-28 16:02 [Qemu-devel] [RFC PATCH] convert ram_list to RCU DQ Mike Day
2013-08-28 16:35 ` Paolo Bonzini
2013-08-29 19:18 ` Mike Day
2013-08-30 8:19 ` Paolo Bonzini [this message]
2013-08-30 14:08 ` Mike Day
2013-08-28 16:37 ` 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=52205584.5080509@redhat.com \
--to=pbonzini@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=mathieu.desnoyers@efficios.com \
--cc=ncmike@ncultra.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.