On Wed, Jun 24, 2015 at 3:26 PM, Paul Turner <pjt@xxxxxxxxxx> 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-cpu gsbase. Then you could do cmpxchg with a gs prefix to atomically take a percpu lock and atomically release a percpu lock and check whether someone else stole the lock from you. (Note: cmpxchg, unlike lock cmpxchg, is very fast.) This is totally useless for other architectures, but I think it would be reasonable clean on x86. Thoughts? I can elaborate if necessary. --Andy -- To unsubscribe from this list: send the line "unsubscribe linux-api" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html