Re: [PATCH v3 07/13] futex: Throughput-optimized (TP) futexes

2016-10-01 Thread Waiman Long
On 10/01/2016 02:47 AM, Thomas Gleixner wrote: On Fri, 30 Sep 2016, Waiman Long wrote: + WRITE_ONCE(state->owner, current); + preempt_disable(); + for (;;) { + ret = futex_trylock(uaddr, vpid,&uval, true); Did you actually read what I said? You CANNOT access user

Re: [PATCH v3 07/13] futex: Throughput-optimized (TP) futexes

2016-09-30 Thread Thomas Gleixner
On Fri, 30 Sep 2016, Waiman Long wrote: > + WRITE_ONCE(state->owner, current); > + preempt_disable(); > + for (;;) { > + ret = futex_trylock(uaddr, vpid, &uval, true); Did you actually read what I said? You CANNOT access userspace in a preempt disabled region without disabl

[PATCH v3 07/13] futex: Throughput-optimized (TP) futexes

2016-09-30 Thread Waiman Long
A new futex implementation called throughput-optimized (TP) futexes is introduced. The goal of this new futex type is to maximize locking throughput at the expense of fairness and deterministic latency. Its throughput is higher than that of the wait-wake futexes especially on systems with a large n