[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 08/12] cpus: always call seqlock_write in cpu
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v2 08/12] cpus: always call seqlock_write in cpu_update_icount |
Date: |
Tue, 11 Sep 2018 05:53:14 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 09/10/2018 04:27 PM, Emilio G. Cota wrote:
>
> -#ifndef CONFIG_ATOMIC64
> seqlock_write_lock(&timers_state.vm_clock_seqlock,
> &timers_state.vm_clock_lock);
> -#endif
> atomic_set__nocheck(&timers_state.qemu_icount,
> timers_state.qemu_icount + executed);
> -#ifndef CONFIG_ATOMIC64
> seqlock_write_unlock(&timers_state.vm_clock_seqlock,
> &timers_state.vm_clock_lock);
> -#endif
I don't understand this. Surely you either want atomic64_set,
or an actual atomic64_add, but no extra lock when CONFIG_ATOMIC64.
r~
- Re: [Qemu-devel] [PATCH v2 02/12] util: add atomic64, (continued)
[Qemu-devel] [PATCH v2 06/12] atomic: fix comment s/x64_64/x86_64/, Emilio G. Cota, 2018/09/10
[Qemu-devel] [PATCH v2 05/12] test-rcu-list: access n_reclaims and n_nodes_removed with atomic64, Emilio G. Cota, 2018/09/10
[Qemu-devel] [PATCH v2 07/12] cpus: initialize timers_state.vm_clock_lock, Emilio G. Cota, 2018/09/10
[Qemu-devel] [PATCH v2 04/12] qsp: use atomic64 accessors, Emilio G. Cota, 2018/09/10
[Qemu-devel] [PATCH v2 03/12] tests: add atomic64-bench, Emilio G. Cota, 2018/09/10
[Qemu-devel] [PATCH v2 08/12] cpus: always call seqlock_write in cpu_update_icount, Emilio G. Cota, 2018/09/10
Re: [Qemu-devel] [PATCH v2 00/12] i386 + x86_64 mttcg, Paolo Bonzini, 2018/09/11