Signed-off-by: Liu Ping Fan
---
slirp/slirp.c | 17 -
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/slirp/slirp.c b/slirp/slirp.c
index b71c617..c47af8f 100644
--- a/slirp/slirp.c
+++ b/slirp/slirp.c
@@ -47,6 +47,11 @@ static QTAILQ_HEAD(slirp_instances, Slirp
Each slirp has its own time to caculate timeout.
Signed-off-by: Liu Ping Fan
---
slirp/slirp.c | 22 ++
slirp/slirp.h | 3 +++
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/slirp/slirp.c b/slirp/slirp.c
index 80b28ea..b71c617 100644
--- a/slirp/slirp.c
no timeout modifications in slirp_pollfds_fill()
v2:
fold slirp_update_timeout logic into slirp_pollfds_fill.
Liu Ping Fan (3):
slirp: make timeout local
slirp: define timeout as macro
slirp: set mainloop timeout with more precise value
main-loop.c | 3 +--
slirp/libslirp.h | 3
On Sat, Aug 24, 2013 at 12:54 AM, Jan Kiszka wrote:
> On 2013-08-21 04:15, Liu Ping Fan wrote:
>> If slirp needs to emulate tcp timeout, then the timeout value
>> for mainloop should be more precise, which is determined by
>> slirp's fasttimo or slowtimo. Achi
On Sat, Aug 24, 2013 at 12:49 AM, Jan Kiszka wrote:
> On 2013-08-21 10:07, liu ping fan wrote:
>> On Wed, Aug 21, 2013 at 3:36 PM, Alex Bligh wrote:
>>>
>>>
>>> --On 21 August 2013 10:15:52 +0800 Liu Ping Fan wrote:
>>>
>>>> -void
On Wed, Aug 21, 2013 at 3:36 PM, Alex Bligh wrote:
>
>
> --On 21 August 2013 10:15:52 +0800 Liu Ping Fan wrote:
>
>> -void slirp_update_timeout(uint32_t *timeout)
>> +static void slirp_update_timeout(uint32_t *timeout)
>> {
>> -if (!QTAILQ_EMPTY(&
When I debug the hpet with linux v3.10. I found it can not work with
linux-2.6/Documentation/timers/hpet_example.c. But on bare metal,
hpet_example can work!
After tracing, I found the trouble is caused by
drivers/char/hpet.c hpet_timer_set_irq()
gsi = acpi_register_gsi(NULL, irq,
If slirp needs to emulate tcp timeout, then the timeout value
for mainloop should be more precise, which is determined by
slirp's fasttimo or slowtimo. Achieve this by swap the logic
sequence of slirp_pollfds_fill and slirp_update_timeout.
Signed-off-by: Liu Ping Fan
---
main-loop.c
Signed-off-by: Liu Ping Fan
---
slirp/slirp.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/slirp/slirp.c b/slirp/slirp.c
index b71c617..1e8983e 100644
--- a/slirp/slirp.c
+++ b/slirp/slirp.c
@@ -47,6 +47,9 @@ static QTAILQ_HEAD(slirp_instances, Slirp
Each slirp has its own time to caculate timeout.
Signed-off-by: Liu Ping Fan
---
slirp/slirp.c | 22 ++
slirp/slirp.h | 3 +++
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/slirp/slirp.c b/slirp/slirp.c
index 80b28ea..b71c617 100644
--- a/slirp/slirp.c
logic into slirp_pollfds_fill.
Liu Ping Fan (3):
slirp: make timeout local
slirp: define timeout as macro
slirp: set mainloop timeout with more precise value
main-loop.c | 3 +--
slirp/libslirp.h | 3 +--
slirp/slirp.c| 55 +++
slirp/slirp
On Sun, Aug 18, 2013 at 10:54 PM, Paolo Bonzini wrote:
> Il 14/08/2013 02:34, liu ping fan ha scritto:
>> On Tue, Aug 13, 2013 at 10:53 PM, Paolo Bonzini wrote:
>>>
>>> Il 13/08/2013 07:43, Liu Ping Fan ha scritto:
>>>> After disabling the QemuClock,
On Thu, Aug 15, 2013 at 4:22 PM, liu ping fan wrote:
> On Thu, Aug 15, 2013 at 4:01 PM, Stefan Hajnoczi wrote:
>> On Thu, Aug 15, 2013 at 08:05:11AM +0800, liu ping fan wrote:
>>> On Mon, Aug 12, 2013 at 8:49 PM, Stefan Hajnoczi
>>> wrote:
>>> > @@ -376,
On Thu, Aug 15, 2013 at 4:01 PM, Stefan Hajnoczi wrote:
> On Thu, Aug 15, 2013 at 08:05:11AM +0800, liu ping fan wrote:
>> On Mon, Aug 12, 2013 at 8:49 PM, Stefan Hajnoczi wrote:
>> > @@ -376,13 +411,16 @@ bool timerlist_run_timers(QEMUTimerList *timer_list)
>>
On Wed, Aug 14, 2013 at 7:48 PM, Stefan Hajnoczi wrote:
> On Wed, Aug 14, 2013 at 11:02:51AM +0800, Liu Ping Fan wrote:
>> @@ -47,6 +47,9 @@ static QTAILQ_HEAD(slirp_instances, Slirp) slirp_instances
>> =
>> static struct in_addr dns_addr;
>> static u_int dn
On Mon, Aug 12, 2013 at 8:49 PM, Stefan Hajnoczi wrote:
> 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() w
On Wed, Aug 14, 2013 at 4:35 PM, Jan Kiszka wrote:
> On 2013-08-14 05:02, Liu Ping Fan wrote:
>> If slirp needs to emulate tcp timeout, then the timeout value
>> for mainloop should be more precise, which is determined by
>> slirp's fasttimo or slowtimo. Achieve this by
If slirp needs to emulate tcp timeout, then the timeout value
for mainloop should be more precise, which is determined by
slirp's fasttimo or slowtimo. Achieve this by swap the logic
sequence of slirp_pollfds_fill and slirp_update_timeout.
Signed-off-by: Liu Ping Fan
---
main-loop.c
Each slirp has its own time to caculate timeout.
Signed-off-by: Liu Ping Fan
---
slirp/slirp.c | 22 ++
slirp/slirp.h | 3 +++
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/slirp/slirp.c b/slirp/slirp.c
index 80b28ea..b71c617 100644
--- a/slirp/slirp.c
These patches are separated from "[PATCH v1 0/5] make slirp subsystem
self-contained", as Paolo suggested.
With them, we can set the mainloop timeout more precisely when slirp has
to emulate tcp timeout problem.
v2:
fold slirp_update_timeout logic into slirp_pollfds_fill.
Liu P
Signed-off-by: Liu Ping Fan
---
slirp/slirp.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/slirp/slirp.c b/slirp/slirp.c
index b71c617..c224523 100644
--- a/slirp/slirp.c
+++ b/slirp/slirp.c
@@ -47,6 +47,9 @@ static QTAILQ_HEAD(slirp_instances, Slirp
On Tue, Aug 13, 2013 at 10:13 PM, Jan Kiszka wrote:
> On 2013-08-13 15:45, Stefan Hajnoczi wrote:
>> On Tue, Aug 13, 2013 at 09:56:17AM +0200, Jan Kiszka wrote:
>>> in the attempt to use Alex' ppoll-based timer rework for decoupled,
>>> real-time capable timer device models I'm now scratching my h
On Tue, Aug 13, 2013 at 10:53 PM, Paolo Bonzini wrote:
>
> Il 13/08/2013 07:43, Liu Ping Fan ha scritto:
> > After disabling the QemuClock, we should make sure that no QemuTimers
> > are still in flight. To implement that with light overhead, we resort
> > to QemuEvent.
On Tue, Aug 13, 2013 at 4:19 PM, Jan Kiszka wrote:
> On 2013-08-13 05:15, Liu Ping Fan wrote:
>> If slirp needs to emulate tcp timeout, then the timeout value
>> for mainloop should be more precise, which is determined by
>> slirp's fasttimo or slowtimo.
>>
On Tue, Aug 13, 2013 at 4:26 PM, Jan Kiszka wrote:
> On 2013-08-13 07:43, Liu Ping Fan wrote:
>> From: Paolo Bonzini
>>
>> This lets the read-side access run outside the BQL.
>>
>> Signed-off-by: Paolo Bonzini
>&
On Tue, Aug 13, 2013 at 4:29 PM, Jan Kiszka wrote:
> On 2013-08-13 10:25, liu ping fan wrote:
>> On Tue, Aug 13, 2013 at 4:19 PM, Jan Kiszka wrote:
>>> On 2013-08-13 05:15, Liu Ping Fan wrote:
>>>> If slirp needs to emulate tcp timeout, then the timeout value
&g
On Tue, Aug 13, 2013 at 4:03 PM, Jan Kiszka wrote:
> On 2013-08-13 05:15, Liu Ping Fan wrote:
>> Each slirp has its own time to caculate timeout.
>>
>> Signed-off-by: Liu Ping Fan
>> ---
>> slirp/slirp.c | 22 ++
>> slirp/slirp.h | 3
From: Paolo Bonzini
This emulates Win32 manual-reset events using futexes or conditional
variables. Typical ways to use them are with multi-producer,
single-consumer data structures, to test for a complex condition whose
elements come from different threads:
for (;;) {
qemu_event_re
.
And the callers of qemu_clock_enable() should be sync by themselves,
not protected by this patch.
Signed-off-by: Liu Ping Fan
---
include/qemu/timer.h | 4
qemu-timer.c | 53 +++-
2 files changed, 56 insertions(+), 1 deletion(-)
diff
e, it is still protected by BQL.
Lock rule: private lock innermost, ie BQL->"this lock"
Signed-off-by: Liu Ping Fan
---
cpus.c | 36 ++--
1 file changed, 30 insertions(+), 6 deletions(-)
diff --git a/cpus.c b/cpus.c
index a6d7833..a748608 100644
From: Paolo Bonzini
This lets the read-side access run outside the BQL.
Signed-off-by: Paolo Bonzini
---
include/qemu/seqlock.h | 72 ++
1 file changed, 72 insertions(+)
create mode 100644 include/qemu/seqlock.h
diff --git a/include/qemu/seqloc
d code
2. fix race issue for qemu_clock_enable(foo,disable)
Liu Ping Fan (2):
timer: protect timers_state's clock with seqlock
timer: make qemu_clock_enable sync between disable and timer's cb
Paolo Bonzini (2):
seqlock: introduce read-write seqlock
qemu-threa
If slirp needs to emulate tcp timeout, then the timeout value
for mainloop should be more precise, which is determined by
slirp's fasttimo or slowtimo.
Signed-off-by: Liu Ping Fan
---
main-loop.c | 2 +-
slirp/slirp.c | 18 ++
2 files changed, 19 insertions(+), 1 del
Each slirp has its own time to caculate timeout.
Signed-off-by: Liu Ping Fan
---
slirp/slirp.c | 22 ++
slirp/slirp.h | 3 +++
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/slirp/slirp.c b/slirp/slirp.c
index 80b28ea..55654d5 100644
--- a/slirp/slirp.c
Signed-off-by: Liu Ping Fan
---
slirp/slirp.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/slirp/slirp.c b/slirp/slirp.c
index 55654d5..1deaad9 100644
--- a/slirp/slirp.c
+++ b/slirp/slirp.c
@@ -47,6 +47,9 @@ static QTAILQ_HEAD(slirp_instances, Slirp
These patches is separated from "[PATCH v1 0/5] make slirp subsystem
self-contained", as Paolo suggested.
lists.nongnu.org/archive/html/qemu-devel/2013-08/msg00980.html
With them, we can fill the timeout of mainloop more precise, when slirp has to
emulate tcp timeout
problem.
Li
[...]
>> typedef struct QEMUClock QEMUClock;
>> typedef struct QEMUTimerList QEMUTimerList;
>> +typedef QEMUTimerList *QEMUTimerListGroup[QEMU_CLOCK_MAX];
>
> Please wrap this in a struct for easier future extensibility.
>
> I'm not a big fan of the TimerListGroup name, but I cannot think of
> an
On Fri, Aug 9, 2013 at 4:06 PM, Paolo Bonzini wrote:
> Il 08/08/2013 08:26, Liu Ping Fan ha scritto:
>> Each slirp has its own time to caculate timeout.
>>
>> Signed-off-by: Liu Ping Fan
>> ---
>> slirp/slirp.c | 22 ++
>> slirp/s
On Fri, Aug 9, 2013 at 4:12 PM, Jan Kiszka wrote:
> On 2013-08-08 23:41, Alex Bligh wrote:
>> This patch series adds support for timers attached to an AioContext clock
>> which get called within aio_poll.
>>
>> In doing so it removes alarm timers and moves to use ppoll where possible.
>>
>> This p
On Fri, Aug 9, 2013 at 12:29 AM, Michael Roth wrote:
> Quoting Liu Ping Fan (2013-08-08 01:26:07)
>> Introduce struct EventsGSource. It will ease the usage of GSource
>> associated with a group of files, which are dynamically allocated
>> and release, ex, slirp.
>>
>
GPollFD will drive the state of slirp-sockets.
Note, the logic in slirp_pollfds_fill/_poll is not changed, but due to drop of
the functions, rearrange the code to obey the coding style. For other minor
changes, they accord to the nearby style.
Signed-off-by: Liu Ping Fan
---
main-loop.c | 4
Each slirp has its own time to caculate timeout.
Signed-off-by: Liu Ping Fan
---
slirp/slirp.c | 22 ++
slirp/slirp.h | 3 +++
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/slirp/slirp.c b/slirp/slirp.c
index 80b28ea..55654d5 100644
--- a/slirp/slirp.c
In order to decouple with main loop, we fill timeout for gpoll
through slirp's GSource prepare. (Later, after curtime is decoupled,
slirp system will be self-contained, and isolated from main-loop)
Signed-off-by: Liu Ping Fan
---
slirp/slirp.c | 4 +---
1 file changed, 1 insertion(
Introduce struct EventsGSource. It will ease the usage of GSource
associated with a group of files, which are dynamically allocated
and release, ex, slirp.
Signed-off-by: Liu Ping Fan
---
util/Makefile.objs | 1 +
util/event_gsource.c | 94
Each slirp instance will work on its own curtime updated when _prepare.
This patch help to fold the remaining main-loop's related stuff into GSource,
and isolated from main-loop.
Signed-off-by: Liu Ping Fan
---
main-loop.c | 3 ---
slirp/ip_icmp.c | 4 ++--
slirp/libsl
This series aims to port slirp onto GSource, so that it can be driven by
g_main_dispatch.
And clean up the #ifdef in main-loop.
Liu Ping Fan (5):
util: introduce gsource event abstraction
slirp: make timeout local
slirp: make slirp event dispatch based on slirp instance
slirp: decouple
On Wed, Aug 7, 2013 at 7:48 AM, Alex Bligh wrote:
> Add qemu_clock_free and expose qemu_new_clock as qemu_clock_new.
>
> Expose clock types.
>
> Signed-off-by: Alex Bligh
> ---
> include/qemu/timer.h | 22 ++
> qemu-timer.c | 11 ++-
> 2 files changed, 28
On Wed, Aug 7, 2013 at 7:49 AM, Alex Bligh wrote:
> Split QEMUClock into QEMUClock and QEMUTimerList so that we can
> have more than one QEMUTimerList associated with the same clock.
>
> Introduce a default_timerlist concept and make existing
> qemu_clock_* calls that actually should operate on a
On Tue, Aug 6, 2013 at 5:30 PM, Stefan Hajnoczi wrote:
> On Mon, Aug 05, 2013 at 03:33:24PM +0800, Liu Ping Fan wrote:
>> diff --git a/cpus.c b/cpus.c
>> index 85e743d..ab92db9 100644
>> --- a/cpus.c
>> +++ b/cpus.c
>> @@ -107,12 +107,17 @@ static int64_
;> Note in tcg mode, vm_clock still read inside BQL, so icount is
>> left without change. As for cpu_ticks in timers_state, it
>> is still protected by BQL.
>>
>> Lock rule: private lock innermost, ie BQL->"this lock"
>>
>> Signed-off-by: Liu Pi
On Mon, Aug 5, 2013 at 6:00 PM, Alex Bligh wrote:
> Pingfan,
>
>
> --On 5 August 2013 15:33:22 +0800 Liu Ping Fan
> wrote:
>
>> The patches has been rebased onto Alex's [RFC] [PATCHv5 00/16] aio /
>> timers: Add AioContext timers and use ppoll
>> perm
From: Paolo Bonzini
This emulates Win32 manual-reset events using futexes or conditional
variables. Typical ways to use them are with multi-producer,
single-consumer data structures, to test for a complex condition whose
elements come from different threads:
for (;;) {
qemu_event_re
.
And the callers of qemu_clock_enable() should be sync by themselves,
not protected by this patch.
Signed-off-by: Liu Ping Fan
---
include/qemu/timer.h | 1 +
qemu-timer.c | 11 +++
2 files changed, 12 insertions(+)
diff --git a/include/qemu/timer.h b/include/qemu/timer.h
From: Paolo Bonzini
This lets the read-side access run outside the BQL.
Signed-off-by: Paolo Bonzini
---
include/qemu/seqlock.h | 72 ++
1 file changed, 72 insertions(+)
create mode 100644 include/qemu/seqlock.h
diff --git a/include/qemu/seqloc
protected by BQL.
Lock rule: private lock innermost, ie BQL->"this lock"
Signed-off-by: Liu Ping Fan
---
cpus.c | 36 +---
1 file changed, 29 insertions(+), 7 deletions(-)
diff --git a/cpus.c b/cpus.c
index 85e743d..ab92db9 100644
--- a/cpus.c
e(foo,false)
Liu Ping Fan (2):
timer: protect timers_state's clock with seqlock
timer: make qemu_clock_enable sync between disable and timer's cb
Paolo Bonzini (2):
seqlock: introduce read-write seqlock
qemu-thread: add QemuEvent
cpus.c | 36 +++--
On Fri, Aug 2, 2013 at 10:43 PM, Stefan Hajnoczi wrote:
> On Fri, Aug 02, 2013 at 11:33:40AM +0800, liu ping fan wrote:
>> On Thu, Aug 1, 2013 at 9:28 PM, Alex Bligh wrote:
>> > Paolo,
>> >
>> >
>> > --On 1 August 2013 08:19:34 -0400 Paolo Bonzini
On Fri, Aug 2, 2013 at 2:20 PM, MORITA Kazutaka
wrote:
> At Tue, 30 Jul 2013 15:58:58 +0200,
> Stefan Hajnoczi wrote:
>>
>> On Fri, Jul 26, 2013 at 03:10:48PM +0900, MORITA Kazutaka wrote:
>> > This helper function behaves similarly to co_sleep_ns(), but the
>> > sleeping coroutine will be resumed
On Thu, Aug 1, 2013 at 9:28 PM, Alex Bligh wrote:
> Paolo,
>
>
> --On 1 August 2013 08:19:34 -0400 Paolo Bonzini wrote:
>
>>> > True, qemu_event basically works only when a single thread resets it.
>>> > But there is no race condition here because qemu_run_timers cannot be
>>> > executed concurre
On Thu, Aug 1, 2013 at 10:28 PM, Paolo Bonzini wrote:
> On Aug 01 2013, Alex Bligh wrote:
>> Paolo,
>>
>> --On 1 August 2013 15:51:11 +0200 Paolo Bonzini wrote:
>>
>> >>> So actually there is another problem with this patch (both the
>> >>> condvar and the event approach are equally buggy). If
On Tue, Jul 30, 2013 at 5:17 PM, Paolo Bonzini wrote:
> Il 30/07/2013 04:42, liu ping fan ha scritto:
>> On Mon, Jul 29, 2013 at 7:21 PM, Paolo Bonzini wrote:
>>> Il 29/07/2013 10:10, liu ping fan ha scritto:
>>>> On Mon, Jul 29, 2013 at 2:30 PM, Paolo Bonzini wr
On Mon, Jul 29, 2013 at 5:22 PM, Stefan Hajnoczi wrote:
> On Mon, Jul 29, 2013 at 11:16:03AM +0800, Liu Ping Fan wrote:
>> summary of the model:
>> Three qemu-wide clock source allowed in system. And each AioContext has
>> three corresponding timer list to run time
On Mon, Jul 29, 2013 at 7:21 PM, Paolo Bonzini wrote:
> Il 29/07/2013 10:10, liu ping fan ha scritto:
>> On Mon, Jul 29, 2013 at 2:30 PM, Paolo Bonzini wrote:
>>> Il 29/07/2013 05:16, Liu Ping Fan ha scritto:
>>>> After disabling the QemuClock, we should make su
On Mon, Jul 29, 2013 at 9:11 PM, Paolo Bonzini wrote:
> Il 29/07/2013 10:20, liu ping fan ha scritto:
>>> > Another issue is that deadline computation is not using the AioContext's
>>> > timer lists.
>>> >
>> Sorry, can not catch the meaning. W
On Mon, Jul 29, 2013 at 2:32 PM, Paolo Bonzini wrote:
> Il 29/07/2013 05:16, Liu Ping Fan ha scritto:
>> Currently, timers run on iothread inside QBL, this limits the usage
>> of timers in some case, e.g. virtio-blk-dataplane. In order to run
>> timers on private thre
On Mon, Jul 29, 2013 at 2:30 PM, Paolo Bonzini wrote:
> Il 29/07/2013 05:16, Liu Ping Fan ha scritto:
>> After disabling the QemuClock, we should make sure that no QemuTimers
>> are still in flight. To implement that, the caller of disabling will
>> wait until the last us
On Mon, Jul 29, 2013 at 2:26 PM, Paolo Bonzini wrote:
> Il 29/07/2013 05:16, Liu Ping Fan ha scritto:
>> In kvm mode, vm_clock may be read on AioContexts outside BQL(next
>> patch). This will make timers_state --the foundation of vm_clock
>> exposed to race condition.
Stop call timers in main loop and let each mini event-loop
run its own timers.
Signed-off-by: Liu Ping Fan
---
aio-posix.c | 2 ++
include/qemu/timer.h | 4 ++--
main-loop.c | 2 --
qemu-timer.c | 15 ++-
4 files changed, 14 insertions(+), 9 deletions
later, we will run timers in aio_poll.
Signed-off-by: Liu Ping Fan
-- issue to fix ---
Note: before this patch, there should be another one to fix the race
issue by qemu_mod_timer() and _run_timers().
---
async.c | 9
include/block/aio.h | 13 +++
include/qemu
-off-by: Liu Ping Fan
---
qemu-timer.c | 106 ++-
1 file changed, 68 insertions(+), 38 deletions(-)
diff --git a/qemu-timer.c b/qemu-timer.c
index 9500d12..5a42035 100644
--- a/qemu-timer.c
+++ b/qemu-timer.c
@@ -30,6 +30,7 @@
#include "
After disabling the QemuClock, we should make sure that no QemuTimers
are still in flight. To implement that, the caller of disabling will
wait until the last user's exit.
Note, the callers of qemu_clock_enable() should be sync by themselves,
not protected by this patch.
Signed-off-by: Liu
lock innermost, ie BQL->"this lock"
Signed-off-by: Liu Ping Fan
---
cpus.c | 26 +-
1 file changed, 21 insertions(+), 5 deletions(-)
diff --git a/cpus.c b/cpus.c
index 61e86a8..4af81e9 100644
--- a/cpus.c
+++ b/cpus.c
@@ -112,7 +112,9 @@ typedef struc
problem (Thanks for Jan and Stefan)
fix process=true when aio_poll run timers (Thanks for Alex)
Liu Ping Fan (5):
timer: protect timers_state with lock
timer: pick out timer list info from QemuClock
timer: make qemu_clock_enable sync between disable and timer's cb
timer: associate
[...]
>> http://social.msdn.microsoft.com/Forums/vstudio/en-US/e8a7cb1e-9edd-4ee3-982e-f66b7bf6ae44/improve-accuracy-waitforsingleobject
>>
>> suggest that WaitFor{Single,Multiple}Objects can have pretty
>> appalling latency anyway (100ms!), and there's no evidence that's
>> limited by making one o
On Wed, Jul 24, 2013 at 2:42 PM, Paolo Bonzini wrote:
> Il 24/07/2013 03:28, liu ping fan ha scritto:
>> On Tue, Jul 23, 2013 at 6:30 PM, Paolo Bonzini wrote:
>>> > Il 23/07/2013 04:53, liu ping fan ha scritto:
>>>> >> The scenior I can figure out is
On Tue, Jul 23, 2013 at 6:30 PM, Paolo Bonzini wrote:
> Il 23/07/2013 04:53, liu ping fan ha scritto:
>> The scenior I can figure out is if adopting timeout of poll, then when
>> changing the deadline, we need to invoke poll, and set the new
>> timeout, right?
>
> Yes,
On Sun, Jul 21, 2013 at 5:55 PM, Alex Bligh wrote:
>
>
> --On 21 July 2013 16:43:03 +0800 Liu Ping Fan wrote:
>
>> diff --git a/aio-posix.c b/aio-posix.c
>> index b68eccd..29c2769 100644
>> --- a/aio-posix.c
>> +++ b/aio-posix.c
>> @@ -191,6 +191,8 @@ bo
On Mon, Jul 22, 2013 at 6:18 PM, liu ping fan wrote:
> On Mon, Jul 22, 2013 at 5:40 PM, Alex Bligh wrote:
>> Liu,
>>
>>
>> --On 22 July 2013 12:38:02 +0800 liu ping fan wrote:
>>
>>> I read your second series, and try to summary the main differe
On Mon, Jul 22, 2013 at 2:28 PM, Jan Kiszka wrote:
> On 2013-07-22 06:38, liu ping fan wrote:
>> On Sun, Jul 21, 2013 at 5:53 PM, Alex Bligh wrote:
>>> Liu,
>>>
>>>
>>> --On 21 July 2013 16:42:57 +0800 Liu Ping Fan wrote:
>>>
>>&g
On Mon, Jul 22, 2013 at 5:40 PM, Alex Bligh wrote:
> Liu,
>
>
> --On 22 July 2013 12:38:02 +0800 liu ping fan wrote:
>
>> I read your second series, and try to summary the main different between
>> us. Please correct me, if I misunderstood something.
>> --
On Sun, Jul 21, 2013 at 5:53 PM, Alex Bligh wrote:
> Liu,
>
>
> --On 21 July 2013 16:42:57 +0800 Liu Ping Fan wrote:
>
>> Currently, the timers run on iothread within BQL, so virtio-block
>> dataplane can not use throttle, as Stefan Hajnoczi pointed out in his
>&g
Stop call timers in main loop and let each mini event-loop
run its own timers.
Signed-off-by: Liu Ping Fan
---
aio-posix.c | 2 ++
main-loop.c | 2 --
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/aio-posix.c b/aio-posix.c
index b68eccd..29c2769 100644
--- a/aio-posix.c
+++ b
Signed-off-by: Liu Ping Fan
---
block.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/block.c b/block.c
index c6b7b6c..b9e6cc8 100644
--- a/block.c
+++ b/block.c
@@ -149,7 +149,12 @@ static void bdrv_block_timer(void *opaque)
void bdrv_io_limits_enable
Currently, timers run on iothread inside QBL, this limits the usage
of timers in some case, e.g. virtio-blk-dataplane. In order to run
timers on private thread, we arm AioContext with three lists in
according to three QemuClock (and later, run timers in aio_poll).
Signed-off-by: Liu Ping Fan
Signed-off-by: Liu Ping Fan
---
cpus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cpus.c b/cpus.c
index 61e86a8..4254ca9 100644
--- a/cpus.c
+++ b/cpus.c
@@ -112,7 +112,7 @@ typedef struct TimersState {
int64_t dummy;
} TimersState;
-TimersState timers_state
The default aio for BDS is qemu_aio_context, while for data plane,
it will has its own ctx. Relating BDS with AioContext can help
block layer to determine its running environment. Some stuff like
timers need such info, so that they can run in the correct
environment.
Signed-off-by: Liu Ping Fan
lock innermost, ie BQL->"this lock"
Signed-off-by: Liu Ping Fan
---
cpus.c | 27 +++
1 file changed, 23 insertions(+), 4 deletions(-)
diff --git a/cpus.c b/cpus.c
index 4254ca9..22df5fb 100644
--- a/cpus.c
+++ b/cpus.c
@@ -113,6 +113,8 @@ typedef struc
are
linked on a QSLIST for clock reset.
Signed-off-by: Liu Ping Fan
- To fix
sigaction(SIGALRM, &act, NULL) is process-wide, not thread?
I think what I need is an timerfd for each thread, right?
Will fix in next version.
---
async.c | 3 ++
include/block/a
To allow timer to run on the different backend threads,
we will arm the thread's AioContext with its own timer list.
So separate these kind of info from QemuClock.
Signed-off-by: Liu Ping Fan
---
qemu-timer.c | 106 ++-
1 file change
I plan to adopt the
bh model.
(Not sure about this, maybe Stefan's solution in another thread is better)
Although leave most of the race issue unresolved, patch 4 has tried to fix one
of
them as Jan Kiszka points out that vm_clock can be read outside BQL, thanks Jan
:)
Liu Ping Fa
Signed-off-by: Liu Ping Fan
---
include/qom/object.h | 3 ++-
qom/object.c | 15 +--
2 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/include/qom/object.h b/include/qom/object.h
index 23fc048..6331972 100644
--- a/include/qom/object.h
+++ b/include/qom
Qref is similar to kref. It hides the refcnt detail and provides
a common interface. And this patch is based on the idiom of refcnt,
and adopts some optimization about memory model, which finally
falls back on gcc implementation.
Signed-off-by: Liu Ping Fan
---
v2:
put Qref to a dedicated
BH will be used outside big lock, so introduce lock to protect
between the writers, ie, bh's adders and deleter. The lock only
affects the writers and bh's callback does not take this extra lock.
Note that for the same AioContext, aio_bh_poll() can not run in
parallel yet.
Signed-off-by
Qref is similar to kref. It hides the refcnt detail and provides
a common interface. And this patch is based on the idiom of refcnt,
and adopts some optimization about memory model, which finally
falls back on gcc implementation.
Signed-off-by: Liu Ping Fan
---
include/qom/object.h | 34
Signed-off-by: Liu Ping Fan
---
include/qom/object.h | 2 +-
qom/object.c | 15 +--
2 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/include/qom/object.h b/include/qom/object.h
index 2e165fb..8426dd1 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
On Sun, Jul 14, 2013 at 1:57 PM, Paolo Bonzini wrote:
> Il 14/07/2013 04:53, Liu Ping Fan ha scritto:
>> Refcnt's atomic inc/dec ops are frequent and its idiom need no seq_cst
>> order. So to get better performance, it worth to adopt _relaxed
>> other than _seq_cst memo
ltins.
Signed-off-by: Liu Ping Fan
---
v2:
update atomics.txt
fix the dependency MACRO
---
docs/atomics.txt | 4
include/qemu/atomic.h | 14 ++
2 files changed, 18 insertions(+)
diff --git a/docs/atomics.txt b/docs/atomics.txt
index 6f2997b..c8ad31d 100644
--- a
On Sat, Jul 13, 2013 at 12:24 AM, Richard Henderson wrote:
> On 07/11/2013 11:32 PM, Liu Ping Fan wrote:
>> Refcnt's atomic inc/dec ops are frequent and its idiom need no seq_cst
>> order. So to get better performance, it worth to adopt _relaxed
>> other than _se
ltins.
Signed-off-by: Liu Ping Fan
---
include/qemu/atomic.h | 14 ++
1 file changed, 14 insertions(+)
diff --git a/include/qemu/atomic.h b/include/qemu/atomic.h
index 0aa8913..1f474b7 100644
--- a/include/qemu/atomic.h
+++ b/include/qemu/atomic.h
@@ -183,8 +183,15 @@
#endif
/* Pr
On Sun, Jul 7, 2013 at 8:31 PM, Andreas Färber wrote:
> Am 07.07.2013 12:00, schrieb Liu Ping Fan:
>> From: Liu Ping Fan
>>
>> BH will be used outside big lock, so introduce lock to protect
>> between the writers, ie, bh's adders and deleter. The lock only
101 - 200 of 753 matches
Mail list logo