Re: [PATCH v2] [Issue #857] Add assert and a condition variable to prevent the next round of barrier-waits from starting before the previous round of barrier-waits completes

2017-04-09 Thread Nadav Har'El
On Thu, Apr 6, 2017 at 10:58 AM, Nadav Har'El wrote: > > I also have a general worry that this code has become much more complex > than it really needs to be - for example do we really need three separate > mutexes (two in this code, one inside the latch) to implement a barrier? I > think a reimp

Example of using virtio network interfaces from application code

2017-04-09 Thread Rick Payne (Offshore)
Hi, Is there a good example that uses the virtio network interfaces direct? ie. an application that uses ‘assign-net’ and talks directly to the network interface code in OSv? I’m looking for a sample I can learn from. Cheers, Rick -- You received this message because you are subscribed to th

[PATCH] reimplement pthread_barrier_*()

2017-04-09 Thread Nadav Har'El
Our pthread barrier implementation had a race described in issue #857, where one of the threads may start its next round of waiting before the counter was reset, which can lead to a hang as not enough threads decrease the counter. This patch provides a completely new implementation, inspired by th

Re: [PATCH v2] [Issue #857] Add assert and a condition variable to prevent the next round of barrier-waits from starting before the previous round of barrier-waits completes

2017-04-09 Thread Nadav Har'El
On Sun, Apr 9, 2017 at 5:33 PM, Nadav Har'El wrote: > A third alternative to re-implementing from scratch or fixing this > latch-based implementation, could be to implement based on other building > blocks that OSv already has (and are better debugged than either "latch" or > "barrier"). > > This

Re: [PATCH v2] [Issue #857] Add assert and a condition variable to prevent the next round of barrier-waits from starting before the previous round of barrier-waits completes

2017-04-09 Thread 'Rean Griffith' via OSv Development
Hi Nadav, Your proposal looks simpler than the attached cleanup of an earlier patch. I'll try to reproduce 857 locally and verify your fix. thanks, Rean On 04/09/2017 03:50 PM, Nadav Har'El wrote: > On Sun, Apr 9, 2017 at 5:33 PM, Nadav Har'El wrote: > >> A third alternative to re-implementin

Re: Example of using virtio network interfaces from application code

2017-04-09 Thread Dor Laor
On Sun, Apr 9, 2017 at 3:05 PM, Rick Payne (Offshore) wrote: > Hi, > > Is there a good example that uses the virtio network interfaces direct? > ie. an application that uses ‘assign-net’ and talks directly to the network > interface code in OSv? > Not that I know of. It was a cool idea but most