Re: [Qemu-devel] [PATCH] rng: switch request queue to QSIMPLEQ

2016-03-04 Thread Amit Shah
On (Thu) 03 Mar 2016 [14:16:11], Ladi Prosek wrote: > QSIMPLEQ supports appending to tail in O(1) and is intrusive so > it doesn't require extra memory allocations for the bookkeeping > data. > > Suggested-by: Paolo Bonzini > Signed-off-by: Ladi Prosek

Re: [Qemu-devel] [PATCH] rng: switch request queue to QSIMPLEQ

2016-03-04 Thread Amit Shah
On (Fri) 04 Mar 2016 [10:27:57], Paolo Bonzini wrote: > > > On 04/03/2016 10:19, Ladi Prosek wrote: > > On Fri, Mar 4, 2016 at 10:12 AM, Paolo Bonzini wrote: > >> > >> > >> On 04/03/2016 09:04, Ladi Prosek wrote: > >>> +QSIMPLEQ_INIT(>requests); > >>> } > >

Re: [Qemu-devel] [PATCH] rng: switch request queue to QSIMPLEQ

2016-03-04 Thread Paolo Bonzini
On 04/03/2016 10:19, Ladi Prosek wrote: > On Fri, Mar 4, 2016 at 10:12 AM, Paolo Bonzini wrote: >> >> >> On 04/03/2016 09:04, Ladi Prosek wrote: >>> +QSIMPLEQ_INIT(>requests); >>> } > > This init here isn't necessary, the accessors for the queue will

Re: [Qemu-devel] [PATCH] rng: switch request queue to QSIMPLEQ

2016-03-04 Thread Ladi Prosek
On Fri, Mar 4, 2016 at 10:12 AM, Paolo Bonzini wrote: > > > On 04/03/2016 09:04, Ladi Prosek wrote: >> +QSIMPLEQ_INIT(>requests); >> } >>> > >>> > This init here isn't necessary, the accessors for the queue will take >>> > care of this. >> We are basically

Re: [Qemu-devel] [PATCH] rng: switch request queue to QSIMPLEQ

2016-03-04 Thread Amit Shah
On (Fri) 04 Mar 2016 [09:04:22], Ladi Prosek wrote: > On Fri, Mar 4, 2016 at 7:27 AM, Amit Shah wrote: > > On (Thu) 03 Mar 2016 [14:16:11], Ladi Prosek wrote: > >> QSIMPLEQ supports appending to tail in O(1) and is intrusive so > >> it doesn't require extra memory

Re: [Qemu-devel] [PATCH] rng: switch request queue to QSIMPLEQ

2016-03-04 Thread Paolo Bonzini
On 04/03/2016 09:04, Ladi Prosek wrote: >>> >> +QSIMPLEQ_INIT(>requests); >>> >> } >> > >> > This init here isn't necessary, the accessors for the queue will take >> > care of this. > We are basically purging the queue here and we want to leave it in a > consistent state. Without the

Re: [Qemu-devel] [PATCH] rng: switch request queue to QSIMPLEQ

2016-03-04 Thread Ladi Prosek
On Fri, Mar 4, 2016 at 7:27 AM, Amit Shah wrote: > On (Thu) 03 Mar 2016 [14:16:11], Ladi Prosek wrote: >> QSIMPLEQ supports appending to tail in O(1) and is intrusive so >> it doesn't require extra memory allocations for the bookkeeping >> data. >> >> Suggested-by: Paolo

Re: [Qemu-devel] [PATCH] rng: switch request queue to QSIMPLEQ

2016-03-03 Thread Amit Shah
On (Thu) 03 Mar 2016 [14:16:11], Ladi Prosek wrote: > QSIMPLEQ supports appending to tail in O(1) and is intrusive so > it doesn't require extra memory allocations for the bookkeeping > data. > > Suggested-by: Paolo Bonzini > Signed-off-by: Ladi Prosek

Re: [Qemu-devel] [PATCH] rng: switch request queue to QSIMPLEQ

2016-03-03 Thread Paolo Bonzini
On 03/03/2016 14:16, Ladi Prosek wrote: > QSIMPLEQ supports appending to tail in O(1) and is intrusive so > it doesn't require extra memory allocations for the bookkeeping > data. > > Suggested-by: Paolo Bonzini > Signed-off-by: Ladi Prosek

[Qemu-devel] [PATCH] rng: switch request queue to QSIMPLEQ

2016-03-03 Thread Ladi Prosek
QSIMPLEQ supports appending to tail in O(1) and is intrusive so it doesn't require extra memory allocations for the bookkeeping data. Suggested-by: Paolo Bonzini Signed-off-by: Ladi Prosek --- backends/rng-egd.c| 9 - backends/rng-random.c