[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/3] migration: Use automatic rcu_read unlock in
From: |
Daniel P . Berrangé |
Subject: |
Re: [Qemu-devel] [PATCH 2/3] migration: Use automatic rcu_read unlock in ram.c |
Date: |
Wed, 11 Sep 2019 17:59:38 +0100 |
User-agent: |
Mutt/1.12.1 (2019-06-15) |
On Wed, Sep 11, 2019 at 05:42:01PM +0100, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <address@hidden>
>
> 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 <address@hidden>
> ---
> 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.
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 :|
Re: [Qemu-devel] [PATCH 1/3] rcu: Add automatically released rcu_read_lock variant, Eric Blake, 2019/09/11
Re: [Qemu-devel] [PATCH 1/3] rcu: Add automatically released rcu_read_lock variant, Dr. David Alan Gilbert, 2019/09/11
[Qemu-devel] [PATCH 2/3] migration: Use automatic rcu_read unlock in ram.c, Dr. David Alan Gilbert (git), 2019/09/11
- Re: [Qemu-devel] [PATCH 2/3] migration: Use automatic rcu_read unlock in ram.c,
Daniel P . Berrangé <=
[Qemu-devel] [PATCH 3/3] migration: Use automatic rcu_read unlock in rdma.c, Dr. David Alan Gilbert (git), 2019/09/11
Re: [Qemu-devel] [PATCH 0/3] Automatic RCU read unlock, Daniel P . Berrangé, 2019/09/11
Re: [Qemu-devel] [PATCH 0/3] Automatic RCU read unlock, no-reply, 2019/09/11