|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCH 2/2] qemu-timer: make qemu_timer_mod_ns() and qemu_timer_del() thread-safe |
Date: | Mon, 19 Aug 2013 14:15:00 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 |
Il 15/08/2013 14:00, Stefan Hajnoczi ha scritto: > The common case is that we only check the first timer in > ->active_timers. Usually the first timer has not expired yet and we > return; the lock was taken once only. > > I'm not sure it's worth complicating the case where we iterate multiple > times. I agree. Later we may try to get creative and optimize the lookup of the first timer (take the lock zero times instead of once if the first timer has not expired yet, take the lock once instead of twice if one timer runs, etc.). Anything beyond that would be premature. Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |