Re: [RFC PATCH 0/3] restartable sequences: fast user-space percpu critical sections

2015-06-28 Thread Mathieu Desnoyers
- On Jun 27, 2015, at 12:25 PM, Andy Lutomirski l...@amacapital.net wrote: > Let me try to summarize some of the approaches with their pros and cons: > I can try summarizing a desiderata that I gather from this thread so far: - *very fast* accesses for per-cpu push/pop, per-cpu lock acqui

Re: [RFC PATCH 0/3] restartable sequences: fast user-space percpu critical sections

2015-06-27 Thread Andy Lutomirski
Let me try to summarize some of the approaches with their pros and cons: --- percpu segment --- This is probably the simplest and might make sense regardless. cmpxchg can be used to do an atomic push onto a linked list. I think that unlocked cmpxchg16b can be used to get an atomic pop. (You'd h

Re: [RFC PATCH 0/3] restartable sequences: fast user-space percpu critical sections

2015-06-25 Thread Paul Turner
On Thu, Jun 25, 2015 at 6:15 PM, Mathieu Desnoyers wrote: > - On Jun 24, 2015, at 10:54 PM, Paul Turner p...@google.com wrote: > >> On Wed, Jun 24, 2015 at 5:07 PM, Andy Lutomirski wrote: >>> On Wed, Jun 24, 2015 at 3:26 PM, Paul Turner wrote: This is a fairly small series demonstrating

Re: [RFC PATCH 0/3] restartable sequences: fast user-space percpu critical sections

2015-06-25 Thread Mathieu Desnoyers
- On Jun 24, 2015, at 10:54 PM, Paul Turner p...@google.com wrote: > On Wed, Jun 24, 2015 at 5:07 PM, Andy Lutomirski wrote: >> On Wed, Jun 24, 2015 at 3:26 PM, Paul Turner wrote: >>> This is a fairly small series demonstrating a feature we've found to be >>> quite >>> powerful in practice,

Re: [RFC PATCH 0/3] restartable sequences: fast user-space percpu critical sections

2015-06-24 Thread Paul Turner
On Wed, Jun 24, 2015 at 5:07 PM, Andy Lutomirski wrote: > On Wed, Jun 24, 2015 at 3:26 PM, Paul Turner wrote: >> This is a fairly small series demonstrating a feature we've found to be quite >> powerful in practice, "restartable sequences". >> > > On an extremely short glance, I'm starting to thi

Re: [RFC PATCH 0/3] restartable sequences: fast user-space percpu critical sections

2015-06-24 Thread Andy Lutomirski
On Wed, Jun 24, 2015 at 3:26 PM, Paul Turner wrote: > This is a fairly small series demonstrating a feature we've found to be quite > powerful in practice, "restartable sequences". > On an extremely short glance, I'm starting to think that the right approach, at least for x86, is to implement per

[RFC PATCH 0/3] restartable sequences: fast user-space percpu critical sections

2015-06-24 Thread Paul Turner
This is a fairly small series demonstrating a feature we've found to be quite powerful in practice, "restartable sequences". Most simply: these sequences comprise small snippets of user-code that are guaranteed to be (effectively) executed serially, with support for restart (or other handling) in