Message ID | 20220114004358.299534-2-idan.horowitz@gmail.com |
---|---|
State | New |
Headers | show |
Series | [1/2] softmmu/cpus: Check if the cpu work list is empty atomically | expand |
On 1/14/22 11:43 AM, Idan Horowitz wrote: > This decreases qemu_clock_deadline_ns_all's share from 23.2% to 13% in a > profile of icount-enabled aarch64-softmmu. > > Signed-off-by: Idan Horowitz<idan.horowitz@gmail.com> > --- > util/qemu-timer.c | 3 +++ > 1 file changed, 3 insertions(+) Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
On Wed, 26 Jan 2022 at 23:43, Richard Henderson <richard.henderson@linaro.org> wrote: > > Reviewed-by: Richard Henderson <richard.henderson@linaro.org> > > r~ Hey, I believe this patch might have accidentally been missed? Thanks, Idan Horowitz
On 6/19/22 01:54, Idan Horowitz wrote: > On Wed, 26 Jan 2022 at 23:43, Richard Henderson > <richard.henderson@linaro.org> wrote: >> >> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> >> >> r~ > > Hey, I believe this patch might have accidentally been missed? Oops, yes. Got 1/2 but not 2/2. Queued to tcg-next. r~
diff --git a/util/qemu-timer.c b/util/qemu-timer.c index f36c75e594..e56895ef55 100644 --- a/util/qemu-timer.c +++ b/util/qemu-timer.c @@ -261,6 +261,9 @@ int64_t qemu_clock_deadline_ns_all(QEMUClockType type, int attr_mask) } QLIST_FOREACH(timer_list, &clock->timerlists, list) { + if (!qatomic_read(&timer_list->active_timers)) { + continue; + } qemu_mutex_lock(&timer_list->active_timers_lock); ts = timer_list->active_timers; /* Skip all external timers */
This decreases qemu_clock_deadline_ns_all's share from 23.2% to 13% in a profile of icount-enabled aarch64-softmmu. Signed-off-by: Idan Horowitz <idan.horowitz@gmail.com> --- util/qemu-timer.c | 3 +++ 1 file changed, 3 insertions(+)