Re: [Qemu-devel] Re: [PATCH 11/19] use a bottom half to run timers

2010-01-05 Thread Jamie Lokier
Anthony Liguori wrote: > Thread and signal safety are slightly different. They are very different: Virtually all libc calls are thread safe, unless they use unsafe static data APIs. On the other hand, the number of libc calls that are signal safe is very limited. For example, calling printf() i

[Qemu-devel] Re: [PATCH 11/19] use a bottom half to run timers

2010-01-05 Thread Paolo Bonzini
On 01/04/2010 09:24 PM, Anthony Liguori wrote: I'm not a huge fan of this for a couple reasons. The first is that it introduces a subtle semantic change. Previously, timers always ran before bottom halves whereas after this change, timers may run after some bottoms halves but before others.

[Qemu-devel] Re: [PATCH 11/19] use a bottom half to run timers

2010-01-05 Thread Michael S. Tsirkin
On Mon, Jan 04, 2010 at 02:24:53PM -0600, Anthony Liguori wrote: > On 12/21/2009 02:09 AM, Paolo Bonzini wrote: >> Make the timer subsystem register its own bottom half instead of >> placing the bottom half code in the heart of the main loop. To >> test if an alarm timer is pending, just check if

[Qemu-devel] Re: [PATCH 11/19] use a bottom half to run timers

2010-01-05 Thread Anthony Liguori
On 01/04/2010 02:01 PM, Michael S. Tsirkin wrote: On Mon, Jan 04, 2010 at 02:24:53PM -0600, Anthony Liguori wrote: On 12/21/2009 02:09 AM, Paolo Bonzini wrote: Make the timer subsystem register its own bottom half instead of placing the bottom half code in the heart of the main loop.

[Qemu-devel] Re: [PATCH 11/19] use a bottom half to run timers

2010-01-05 Thread Anthony Liguori
On 01/04/2010 02:01 PM, Paolo Bonzini wrote: On 01/04/2010 09:24 PM, Anthony Liguori wrote: I'm not a huge fan of this for a couple reasons. The first is that it introduces a subtle semantic change. Previously, timers always ran before bottom halves whereas after this change, timers may run a

[Qemu-devel] Re: [PATCH 11/19] use a bottom half to run timers

2010-01-05 Thread Michael S. Tsirkin
On Mon, Jan 04, 2010 at 05:54:13PM -0600, Anthony Liguori wrote: > On 01/04/2010 02:01 PM, Michael S. Tsirkin wrote: >> On Mon, Jan 04, 2010 at 02:24:53PM -0600, Anthony Liguori wrote: >> >>> On 12/21/2009 02:09 AM, Paolo Bonzini wrote: >>> Make the timer subsystem register its own b

[Qemu-devel] Re: [PATCH 11/19] use a bottom half to run timers

2010-01-05 Thread Paolo Bonzini
On 01/05/2010 12:59 AM, Anthony Liguori wrote: When I think of a main loop, I think of something that provides the following three services 1) fd based events 2) time based events 3) an idle callback The problem we have is that bottom halves aren't quite idle callbacks. They have some really w

[Qemu-devel] Re: [PATCH 11/19] use a bottom half to run timers

2010-01-05 Thread Anthony Liguori
On 01/05/2010 06:48 AM, Paolo Bonzini wrote: On 01/05/2010 12:59 AM, Anthony Liguori wrote: When I think of a main loop, I think of something that provides the following three services 1) fd based events 2) time based events 3) an idle callback The problem we have is that bottom halves aren't

[Qemu-devel] Re: [PATCH 11/19] use a bottom half to run timers

2010-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2010 at 06:23:34PM +0300, malc wrote: > On Tue, 5 Jan 2010, Michael S. Tsirkin wrote: > > > On Mon, Jan 04, 2010 at 05:54:13PM -0600, Anthony Liguori wrote: > > > On 01/04/2010 02:01 PM, Michael S. Tsirkin wrote: > > >> On Mon, Jan 04, 2010 at 02:24:53PM -0600, Anthony Liguori wrot

[Qemu-devel] Re: [PATCH 11/19] use a bottom half to run timers

2010-01-05 Thread malc
On Tue, 5 Jan 2010, Michael S. Tsirkin wrote: > On Mon, Jan 04, 2010 at 05:54:13PM -0600, Anthony Liguori wrote: > > On 01/04/2010 02:01 PM, Michael S. Tsirkin wrote: > >> On Mon, Jan 04, 2010 at 02:24:53PM -0600, Anthony Liguori wrote: > >> > >>> On 12/21/2009 02:09 AM, Paolo Bonzini wrote: >

[Qemu-devel] Re: [PATCH 11/19] use a bottom half to run timers

2010-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2010 at 06:32:09PM +0300, malc wrote: > On Tue, 5 Jan 2010, Michael S. Tsirkin wrote: > > > On Tue, Jan 05, 2010 at 06:23:34PM +0300, malc wrote: > > > On Tue, 5 Jan 2010, Michael S. Tsirkin wrote: > > > > > > > On Mon, Jan 04, 2010 at 05:54:13PM -0600, Anthony Liguori wrote: > >

[Qemu-devel] Re: [PATCH 11/19] use a bottom half to run timers

2010-01-05 Thread malc
On Tue, 5 Jan 2010, Michael S. Tsirkin wrote: > On Tue, Jan 05, 2010 at 06:23:34PM +0300, malc wrote: > > On Tue, 5 Jan 2010, Michael S. Tsirkin wrote: > > > > > On Mon, Jan 04, 2010 at 05:54:13PM -0600, Anthony Liguori wrote: > > > > On 01/04/2010 02:01 PM, Michael S. Tsirkin wrote: > > > >> On

[Qemu-devel] Re: [PATCH 11/19] use a bottom half to run timers

2010-01-05 Thread malc
On Tue, 5 Jan 2010, Michael S. Tsirkin wrote: > On Tue, Jan 05, 2010 at 06:32:09PM +0300, malc wrote: > > On Tue, 5 Jan 2010, Michael S. Tsirkin wrote: > > > > > On Tue, Jan 05, 2010 at 06:23:34PM +0300, malc wrote: > > > > On Tue, 5 Jan 2010, Michael S. Tsirkin wrote: > > > > > > > > > On Mon,