Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1456036
| From | Oleg Nesterov <oleg@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] sched: Avoid that __wait_on_bit_lock() hangs |
| Date | 2016-08-03 23:40 +0200 |
| Message-ID | <s2c3n-85c-11@gated-at.bofh.it> (permalink) |
| References | <s2akV-6WY-3@gated-at.bofh.it> <s2akV-6WY-1@gated-at.bofh.it> <s2c3n-85c-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Bart, I too can't understand the problem. Perhaps you missed the fact that abort_exclusive_wait() does everything under wait_queue_head_t->lock ? On 08/03, Bart Van Assche wrote: > > try_to_wake_up() locks task_struct.pi_lock but abort_exclusive_wait() not. > My assumption is that the following sequence of events leads to the lockup > that I had mentioned in the description of my patch: > * try_to_wake_up() is called for the task that will execute > abort_exclusive_wait(). > * After try_to_wake_up() has checked task_struct.state and before > autoremove_wake_function() has tried to remove the task from the wait > queue, abort_exclusive_wait() is executed for the same task. But we do not care if we race with another try_to_wake_up(), or even with another exclusive wake_up_nr(wq)/whatever unless wq is the same. And if this wq is the same, then wake_up_nr() will do try_to_wake_up/autoremove either before or after abort_exclusive_wait(), wake_up_nr() takes the same wq->lock. And this means that abort_exclusive_wait() can't be called "After try_to_wake_up()" and "before autoremove_wake_function()". Oleg.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] sched: Avoid that __wait_on_bit_lock() hangs Peter Zijlstra <peterz@infradead.org> - 2016-08-03 21:50 +0200
Re: [PATCH] sched: Avoid that __wait_on_bit_lock() hangs Oleg Nesterov <oleg@redhat.com> - 2016-08-03 23:40 +0200
Re: [PATCH] sched: Avoid that __wait_on_bit_lock() hangs Peter Zijlstra <peterz@infradead.org> - 2016-08-04 16:20 +0200
Re: [PATCH] sched: Avoid that __wait_on_bit_lock() hangs Peter Zijlstra <peterz@infradead.org> - 2016-08-08 12:30 +0200
Re: [PATCH] sched: Avoid that __wait_on_bit_lock() hangs Bart Van Assche <bvanassche@acm.org> - 2016-08-08 16:40 +0200
Re: [PATCH] sched: Avoid that __wait_on_bit_lock() hangs Oleg Nesterov <oleg@redhat.com> - 2016-08-08 18:30 +0200
Re: [PATCH] sched: Avoid that __wait_on_bit_lock() hangs Oleg Nesterov <oleg@redhat.com> - 2016-08-09 19:20 +0200
Re: [PATCH] sched: Avoid that __wait_on_bit_lock() hangs Oleg Nesterov <oleg@redhat.com> - 2016-08-10 21:00 +0200
Re: [PATCH] sched: Avoid that __wait_on_bit_lock() hangs Oleg Nesterov <oleg@redhat.com> - 2016-08-10 21:10 +0200
Re: [PATCH] sched: Avoid that __wait_on_bit_lock() hangs Peter Zijlstra <peterz@infradead.org> - 2016-08-10 21:20 +0200
Re: [PATCH] sched: Avoid that __wait_on_bit_lock() hangs Oleg Nesterov <oleg@redhat.com> - 2016-08-10 23:30 +0200
csiph-web