[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 0/5] Automatic RCU read unlock
From: |
Daniel P . Berrangé |
Subject: |
Re: [Qemu-devel] [PATCH v3 0/5] Automatic RCU read unlock |
Date: |
Wed, 25 Sep 2019 16:49:38 +0100 |
User-agent: |
Mutt/1.12.1 (2019-06-15) |
On Wed, Sep 25, 2019 at 04:28:58PM +0100, Dr. David Alan Gilbert wrote:
> * Paolo Bonzini (address@hidden) wrote:
> > On 25/09/19 15:13, Dr. David Alan Gilbert wrote:
> > > * Dr. David Alan Gilbert (git) (address@hidden) wrote:
> > >> From: "Dr. David Alan Gilbert" <address@hidden>
> > >>
> > >> This patch uses glib's g_auto mechanism to automatically free
> > >> rcu_read_lock's at the end of the block. Given that humans
> > >> have a habit of forgetting an error path somewhere it's
> > >> best to leave it to the compiler.
> > >
> > > I've had to unqueue this - clang doesn't like the apparently unused
> > > auto variable; we need to find a way to make that happy.
> >
> > __attribute__((unused))?
>
> I worry that if I do that, then it'll optimise it out.
Can you just insert a dummy use of the variable. eg libvirt does
this by just taking the address of the unused variable and casting
the result to void.
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 :|
- [Qemu-devel] [PATCH v3 3/5] migration: Use automatic rcu_read unlock in ram.c, (continued)
- [Qemu-devel] [PATCH v3 3/5] migration: Use automatic rcu_read unlock in ram.c, Dr. David Alan Gilbert (git), 2019/09/13
- [Qemu-devel] [PATCH v3 4/5] migration: Use automatic rcu_read unlock in rdma.c, Dr. David Alan Gilbert (git), 2019/09/13
- [Qemu-devel] [PATCH v3 5/5] rcu: Use automatic rc_read unlock in core memory/exec code, Dr. David Alan Gilbert (git), 2019/09/13
- Re: [Qemu-devel] [PATCH v3 0/5] Automatic RCU read unlock, Dr. David Alan Gilbert, 2019/09/25
- Re: [Qemu-devel] [PATCH v3 0/5] Automatic RCU read unlock, Dr. David Alan Gilbert, 2019/09/25