All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, quintela@redhat.com
Subject: Re: [Qemu-devel] [PATCH 2/3] migration: Use automatic rcu_read unlock in ram.c
Date: Wed, 11 Sep 2019 18:25:07 +0100	[thread overview]
Message-ID: <20190911172507.GL2894@work-vm> (raw)
In-Reply-To: <20190911165938.GI24295@redhat.com>

* Daniel P. Berrangé (berrange@redhat.com) wrote:
> On Wed, Sep 11, 2019 at 05:42:01PM +0100, Dr. David Alan Gilbert (git) wrote:
> > From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> > 
> > Use the automatic read unlocker in migration/ram.c;
> > only for the cases where the unlock is at the end of the function.
> > 
> > Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> > ---
> >  migration/ram.c | 25 +++++++++----------------
> >  1 file changed, 9 insertions(+), 16 deletions(-)
> > 
> > diff --git a/migration/ram.c b/migration/ram.c
> > index b2bd618a89..750d198f37 100644
> > --- a/migration/ram.c
> > +++ b/migration/ram.c
> > @@ -181,14 +181,14 @@ int foreach_not_ignored_block(RAMBlockIterFunc func, void *opaque)
> >      RAMBlock *block;
> >      int ret = 0;
> >  
> > -    rcu_read_lock();
> > +    RCU_READ_LOCK_AUTO
> 
> FWIW, I'm not a fan of macros which are used without a trailing ';'
> as I believe it can confuses editors' code indentation logic.

Added.

> 
> Regards,
> Daniel
> -- 
> |: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org         -o-            https://fstop138.berrange.com :|
> |: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK


  reply	other threads:[~2019-09-11 17:26 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-11 16:41 [Qemu-devel] [PATCH 0/3] Automatic RCU read unlock Dr. David Alan Gilbert (git)
2019-09-11 16:42 ` [Qemu-devel] [PATCH 1/3] rcu: Add automatically released rcu_read_lock variant Dr. David Alan Gilbert (git)
2019-09-11 16:56   ` Daniel P. Berrangé
2019-09-11 17:04     ` Dr. David Alan Gilbert
2019-09-11 17:09       ` Daniel P. Berrangé
2019-09-11 17:10         ` Dr. David Alan Gilbert
2019-09-11 17:16           ` Daniel P. Berrangé
2019-09-11 17:18             ` Dr. David Alan Gilbert
2019-09-11 17:56     ` Eric Blake
2019-09-11 18:49       ` Dr. David Alan Gilbert
2019-09-11 17:40   ` Eric Blake
2019-09-11 17:49     ` Eric Blake
2019-09-11 18:27       ` Dr. David Alan Gilbert
2019-09-11 18:52     ` Dr. David Alan Gilbert
2019-09-11 16:42 ` [Qemu-devel] [PATCH 2/3] migration: Use automatic rcu_read unlock in ram.c Dr. David Alan Gilbert (git)
2019-09-11 16:59   ` Daniel P. Berrangé
2019-09-11 17:25     ` Dr. David Alan Gilbert [this message]
2019-09-11 16:42 ` [Qemu-devel] [PATCH 3/3] migration: Use automatic rcu_read unlock in rdma.c Dr. David Alan Gilbert (git)
2019-09-11 16:58 ` [Qemu-devel] [PATCH 0/3] Automatic RCU read unlock Daniel P. Berrangé
2019-09-11 17:13   ` Dr. David Alan Gilbert
2019-09-11 20:30 ` no-reply

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=20190911172507.GL2894@work-vm \
    --to=dgilbert@redhat.com \
    --cc=berrange@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@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 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.