Re: [PATCH v2] sched/wake_q: Reduce reference counting for special users

2018-12-18 Thread Davidlohr Bueso
On Tue, 18 Dec 2018, Davidlohr Bueso wrote: +void wake_q_add_safe(struct wake_q_head *head, struct task_struct *task) +{ + if (!__wake_q_add(head, task)) + get_task_struct(task); *sigh* and this should be put().

Re: [PATCH v2] sched/wake_q: Reduce reference counting for special users

2018-12-18 Thread Davidlohr Bueso
Are you missing some text here? Nah this was a leftover, I was just removing it in v3. Thanks. 8<--- [PATCH v3] sched/wake_q: Reduce reference counting for special users Some users, specifically futexes and rwsems, required fixe

Re: [PATCH v2] sched/wake_q: Reduce reference counting for special users

2018-12-18 Thread Waiman Long
On 12/18/2018 01:54 PM, Davidlohr Bueso wrote: > Some users, specifically futexes and rwsems, required fixes > that allowed the callers to be safe when wakeups occur before > they are expected by wake_up_q(). Such scenarios also play > games and rely on reference counting, and until now were > pivo

[PATCH v2] sched/wake_q: Reduce reference counting for special users

2018-12-18 Thread Davidlohr Bueso
Some users, specifically futexes and rwsems, required fixes that allowed the callers to be safe when wakeups occur before they are expected by wake_up_q(). Such scenarios also play games and rely on reference counting, and until now were pivoting on wake_q doing it. With the wake_q_add() call bein