Re: [PATCH RFC] ptr_ring: fix race conditions when resizing

2017-02-12 Thread Jason Wang
On 2017年02月11日 06:31, Michael S. Tsirkin wrote: Resizing currently drops consumer lock. This can cause entries to be reordered, which isn't good in itself. More importantly, consumer can detect a false ring empty condition and block forever. Further, nesting of consumer within producer lock

[PATCH RFC] ptr_ring: fix race conditions when resizing

2017-02-10 Thread Michael S. Tsirkin
Resizing currently drops consumer lock. This can cause entries to be reordered, which isn't good in itself. More importantly, consumer can detect a false ring empty condition and block forever. Further, nesting of consumer within producer lock is problematic for tun, since it produces entries in