Re: [Qemu-devel] [PATCH v2 1/4] seqlock: introduce read-write seqlock

2013-08-13 Thread Paolo Bonzini
Il 13/08/2013 16:53, Jan Kiszka ha scritto: >> > I agree. I was writing the patch without looking at any Linux code >> > (just to be safe since it's GPLv2-only) and misremembered the name of >> > the API. > Another reason to forget about v2+. ;) Anyway, I am fairly sure this code is not based on

Re: [Qemu-devel] [PATCH v2 1/4] seqlock: introduce read-write seqlock

2013-08-13 Thread Jan Kiszka
On 2013-08-13 16:52, Paolo Bonzini wrote: > Il 13/08/2013 11:09, Jan Kiszka ha scritto: >> >> As the usage pattern is >> >> seqlock_read_begin() >> do >> ... >> while (seqlock_read_check()) >> >> I would suggest to call the latter seqlock_read_re

Re: [Qemu-devel] [PATCH v2 1/4] seqlock: introduce read-write seqlock

2013-08-13 Thread Paolo Bonzini
Il 13/08/2013 11:09, Jan Kiszka ha scritto: >>> >>> >> >>> >> As the usage pattern is >>> >> >>> >> seqlock_read_begin() >>> >> do >>> >> ... >>> >> while (seqlock_read_check()) >>> >> >>> >> I would suggest to call the latter seqlock_read_retry(), just like the >>> >> kernel does. >>>

Re: [Qemu-devel] [PATCH v2 1/4] seqlock: introduce read-write seqlock

2013-08-13 Thread Jan Kiszka
On 2013-08-13 10:39, liu ping fan wrote: > 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 >>> --- >>> include/qemu/seqlock.h |

Re: [Qemu-devel] [PATCH v2 1/4] seqlock: introduce read-write seqlock

2013-08-13 Thread liu ping fan
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 >> --- >> include/qemu/seqlock.h | 72 >> +++

Re: [Qemu-devel] [PATCH v2 1/4] seqlock: introduce read-write seqlock

2013-08-13 Thread Jan Kiszka
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 > --- > include/qemu/seqlock.h | 72 > ++ > 1 file changed, 72 insertions(+) > create mode 1

[Qemu-devel] [PATCH v2 1/4] seqlock: introduce read-write seqlock

2013-08-12 Thread Liu Ping Fan
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