Il 30/09/2013 15:34, Alex Bligh ha scritto:
I think the most likely change here is that the walkers might
move outside the BQL. Given modification of this list is so rare,
the lock would be very very read heavy, so RCU is probably a
sensible option.
I agree. Keeping the write side on the
Paolo Bonzini pbonz...@redhat.com writes:
Il 30/09/2013 15:34, Alex Bligh ha scritto:
I think the most likely change here is that the walkers might
move outside the BQL. Given modification of this list is so rare,
the lock would be very very read heavy, so RCU is probably a
sensible
Stefan Hajnoczi stefa...@redhat.com writes:
Introduce QEMUTimerList-active_timers_lock to protect the linked list
of active timers. This allows qemu_timer_mod_ns() to be called from any
thread.
Note that vm_clock is not thread-safe and its use of
qemu_clock_has_timers() works fine today
On 30 Sep 2013, at 13:45, Mike Day wrote:
I've applied this set to Paolo's rcu tree - I see a couple of routines
that appear to need the active_timers_lock:
(line 137 of qemu-timer.c in my tree)
void qemu_clock_notify(QEMUClockType type)
{
QEMUTimerList *timer_list;
QEMUClock
On Mon, Sep 30, 2013 at 8:55 AM, Alex Bligh a...@alex.org.uk wrote:
On 30 Sep 2013, at 13:45, Mike Day wrote:
I've applied this set to Paolo's rcu tree - I see a couple of routines
that appear to need the active_timers_lock:
(line 137 of qemu-timer.c in my tree)
void
Mike,
void qemu_clock_notify(QEMUClockType type)
...
int64_t qemu_clock_deadline_ns_all(QEMUClockType type)
...
I think these functions are always called now with the BQL held, so I
wonder if they are good candidates for RCU?
These routines iterate through the list of timerlists held
On Mon, Sep 30, 2013 at 9:34 AM, Alex Bligh a...@alex.org.uk wrote:
void qemu_clock_notify(QEMUClockType type)
...
int64_t qemu_clock_deadline_ns_all(QEMUClockType type)
...
I think these functions are always called now with the BQL held, so I
wonder if they are good candidates for
Introduce QEMUTimerList-active_timers_lock to protect the linked list
of active timers. This allows qemu_timer_mod_ns() to be called from any
thread.
Note that vm_clock is not thread-safe and its use of
qemu_clock_has_timers() works fine today but is also not thread-safe.
The purpose of this