[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff
From: |
Jan Kiszka |
Subject: |
Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff |
Date: |
Thu, 25 Jul 2013 14:48:40 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
On 2013-07-25 14:41, Stefan Hajnoczi wrote:
> On Thu, Jul 25, 2013 at 2:38 PM, Jan Kiszka <address@hidden> wrote:
>> On 2013-07-25 14:35, Paolo Bonzini wrote:
>>> Il 25/07/2013 14:32, Jan Kiszka ha scritto:
>>>> On 2013-07-25 14:21, Alex Bligh wrote:
>>>>>
>>>>>
>>>>> --On 25 July 2013 14:05:30 +0200 Stefan Hajnoczi <address@hidden>
>>>>> wrote:
>>>>>
>>>>>> Alex Bligh's series gives each AioContext its own rt_clock. This avoids
>>>>>> the need for synchronization in the simple case. If we require timer
>>>>>> access between threads then we really need to synchronize.
>>>>>>
>>>>>> You pointed out in another email that vm_clock stops when the guest is
>>>>>> paused. I think we can find a solution for I/O throttling and QED,
>>>>>> which use vm_clock in the block layer. Note that block jobs already use
>>>>>> rt_clock.
>>>>>
>>>>> I would happily at a QEMUClock of each type to AioContext. They are after
>>>>> all pretty lightweight.
>>>>
>>>> What's the point of adding tones of QEMUClock instances? Considering
>>>> proper abstraction, how are they different for each AioContext? Will
>>>> they run against different clock sources, start/stop at different times?
>>>> If the answer is "they have different timer list", then fix this
>>>> incorrect abstraction.
>>>
>>> s/QEMUClock/QEMUTimerList/ ? :)
>>
>> What do you mean? If the content of struct QEMUClock remained the same,
>> that would just paper over a design mistake.
>
> QEMUClock really isn't much more than a reference to a clock source,
> an enabled/disabled flag, and a timer list.
>
> The point of having one QEMUClock per AioContext is to allow each
> thread's event loop to have its own timers, without synchronization.
>
> What is the design mistake? I only see poor naming.
The concept of clocks (with start/stop property) and active timers shall
not be mixed, they are independent. Just factor out a separate list of
running timers and pass that to the infrastructure that deals with them.
I attached them to a QEMUAlarmTimer instance, you will likely need a
different abstraction.
Jan
--
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux
- Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff, (continued)
- Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff, Alex Bligh, 2013/07/24
- [Qemu-devel] [PATCHv2a] [RFC 8/7 (really)] Add prctl(PR_SET_TIMERSLACK, 1, ...) to reduce timer slack, Alex Bligh, 2013/07/24
- Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff, Alex Bligh, 2013/07/23
- Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff, Stefan Hajnoczi, 2013/07/25
- Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff, Stefan Hajnoczi, 2013/07/25
- Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff, Alex Bligh, 2013/07/25
- Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff, Jan Kiszka, 2013/07/25
- Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff, Paolo Bonzini, 2013/07/25
- Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff, Jan Kiszka, 2013/07/25
- Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff, Stefan Hajnoczi, 2013/07/25
- Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff,
Jan Kiszka <=
- Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff, Paolo Bonzini, 2013/07/25
- Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff, Jan Kiszka, 2013/07/25
- Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff, Stefan Hajnoczi, 2013/07/25
- Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff, Jan Kiszka, 2013/07/25
- Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff, Paolo Bonzini, 2013/07/25
- Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff, Alex Bligh, 2013/07/25
- Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff, Stefan Hajnoczi, 2013/07/26
- Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff, Alex Bligh, 2013/07/26
- Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff, Paolo Bonzini, 2013/07/26
- Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff, Kevin Wolf, 2013/07/29