Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1667392
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH tip/sched/core] Add comments to aid in safer usage of swake_up. |
| Date | 2017-06-16 05:10 +0200 |
| Message-ID | <tSPO2-2SY-7@gated-at.bofh.it> (permalink) |
| References | (5 earlier) <tSi5H-6MW-11@gated-at.bofh.it> <tSjl7-7u8-9@gated-at.bofh.it> <tSuqd-656-3@gated-at.bofh.it> <tSHdM-5vC-35@gated-at.bofh.it> <tSNVT-1Ac-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Jun 16, 2017 at 09:07:57AM +0800, Boqun Feng wrote: > On Thu, Jun 15, 2017 at 10:56:29AM -0700, Paul E. McKenney wrote: > [...] > > > > > > > > FWLIW, I agree. There was a smb_mb() in RT-linux's equivalent of > > > > swait_activate(). > > > > > > > > https://www.spinics.net/lists/linux-rt-users/msg10340.html > > > > > > > > If the barrier goes in swait_active() then we don't have to require all > > > > of the callers of swait_active and swake_up to issue the barrier > > > > instead. Handling this in swait_active is likely to be less error > > > > prone. Though, we could also do something like wq_has_sleeper() and use > > > > that preferentially in swake_up and its variants. > > > > > > > > > > I think it makes more sense that we delete the swait_active() in > > > swake_up()? Because we seems to encourage users to do the quick check on > > > wait queue on their own, so why do the check again in swake_up()? > > > Besides, wake_up() doesn't call waitqueue_activie() outside the lock > > > critical section either. > > > > > > So how about the patch below(Testing is in progress)? Peter? > > > > It is quite possible that a problem I am seeing is caused by this, but > > there are reasons to believe otherwise. And in any case, the problem is > > quite rare, taking tens or perhaps even hundreds of hours of rcutorture > > to reproduce. > > > > So, would you be willing to create a dedicated swait torture test to check > > this out? The usual approach would be to create a circle of kthreads, > > with each waiting on the previous kthread and waking up the next one. > > Each kthread, after being awakened, checks a variable that its waker > > sets just before the wakeup. Have another kthread check for hangs. > > > > Possibly introduce timeouts and random delays to stir things up a bit. > > > > But maybe such a test already exists. Does anyone know of one? I don't > > see anything obvious. > > > > Your waketorture patchset[1] seems to be something similar, at least a > good start ;-) Glad I could help! ;-) > As we don't know which kind of scenario will trigger the problem easily, > I will play around with different ones, and hopefully we can find a way. Makes sense, please let me know how it goes! Thanx, Paul > Regards, > Boqun > > [1]: https://marc.info/?l=linux-kernel&m=146602969518960 > > > Interested? > > > > Thanx, Paul > > > [...]
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH tip/sched/core] Add comments to aid in safer usage of swake_up. Krister Johansen <kjlx@templeofstupid.com> - 2017-06-09 05:30 +0200
Re: [PATCH tip/sched/core] Add comments to aid in safer usage of swake_up. Peter Zijlstra <peterz@infradead.org> - 2017-06-09 09:30 +0200
Re: [PATCH tip/sched/core] Add comments to aid in safer usage of swake_up. "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-06-09 14:50 +0200
Re: [PATCH tip/sched/core] Add comments to aid in safer usage of swake_up. Steven Rostedt <rostedt@goodmis.org> - 2017-06-14 01:30 +0200
Re: [PATCH tip/sched/core] Add comments to aid in safer usage of swake_up. "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-06-14 01:50 +0200
Re: [PATCH tip/sched/core] Add comments to aid in safer usage of swake_up. Steven Rostedt <rostedt@goodmis.org> - 2017-06-14 03:20 +0200
Re: [PATCH tip/sched/core] Add comments to aid in safer usage of swake_up. "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-06-14 06:00 +0200
Re: [PATCH tip/sched/core] Add comments to aid in safer usage of swake_up. Steven Rostedt <rostedt@goodmis.org> - 2017-06-14 15:20 +0200
Re: [PATCH tip/sched/core] Add comments to aid in safer usage of swake_up. Steven Rostedt <rostedt@goodmis.org> - 2017-06-14 17:10 +0200
Re: [PATCH tip/sched/core] Add comments to aid in safer usage of swake_up. Krister Johansen <kjlx@templeofstupid.com> - 2017-06-14 18:30 +0200
Re: [PATCH tip/sched/core] Add comments to aid in safer usage of swake_up. Boqun Feng <boqun.feng@gmail.com> - 2017-06-15 06:20 +0200
Re: [PATCH tip/sched/core] Add comments to aid in safer usage of swake_up. "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-06-15 20:00 +0200
Re: [PATCH tip/sched/core] Add comments to aid in safer usage of swake_up. Boqun Feng <boqun.feng@gmail.com> - 2017-06-16 03:10 +0200
Re: [PATCH tip/sched/core] Add comments to aid in safer usage of swake_up. "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-06-16 05:10 +0200
Re: [PATCH tip/sched/core] Add comments to aid in safer usage of swake_up. "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-06-14 18:00 +0200
csiph-web