Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1259996
| From | "George Spelvin" <linux@horizon.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] ipc/msg: Implement lockless pipelined wakeups |
| Date | 2015-10-31 14:10 +0100 |
| Message-ID | <qpE4W-3dY-1@gated-at.bofh.it> (permalink) |
| References | <qpBJM-1GA-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> Don't we need to keep that NULL init? I might be missing something. I wondered the same thing, but on reading it, the cleanup is that he's gotten rid of the need for the entire thing. Previously, there was a mechanism for detecting "wakeup not quite finished" that used a NULL value, but it's no longer needed. The resultant busy-waiting on the part of the woken-up task was the entire problem this patch aims to fix. So it gets rid of a whole lot of code and barriers. And, as you noticed, the comments explaining them. As the old code explained, the issue is that a task may exit as soon as r_msg is set, so the wakeup procedure has to be: - Ensure r_msg is set to NULL (special-case flag) - Do the wake up - Set r_msg to the final value The woken-up task has to spin as long as r_msg is NULL. Ick. However, a wake_q keeps a reference to a task, so exiting is not a danger. As long as wake_q_add precedes setting r_msg, all is well. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] ipc/msg: Implement lockless pipelined wakeups Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2015-10-30 12:30 +0100
Re: [PATCH] ipc/msg: Implement lockless pipelined wakeups "George Spelvin" <linux@horizon.com> - 2015-10-30 23:40 +0100
Re: [PATCH] ipc/msg: Implement lockless pipelined wakeups Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2015-11-03 15:10 +0100
Re: [PATCH] ipc/msg: Implement lockless pipelined wakeups Thomas Gleixner <tglx@linutronix.de> - 2015-10-31 11:40 +0100
Re: [PATCH] ipc/msg: Implement lockless pipelined wakeups "George Spelvin" <linux@horizon.com> - 2015-10-31 14:10 +0100
Re: [PATCH] ipc/msg: Implement lockless pipelined wakeups Thomas Gleixner <tglx@linutronix.de> - 2015-10-31 16:20 +0100
Re: [PATCH] ipc/msg: Implement lockless pipelined wakeups Davidlohr Bueso <dave@stgolabs.net> - 2015-10-31 20:00 +0100
Re: [PATCH] ipc/msg: Implement lockless pipelined wakeups Davidlohr Bueso <dave@stgolabs.net> - 2015-10-31 20:10 +0100
Re: [PATCH] ipc/msg: Implement lockless pipelined wakeups Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2015-11-03 15:20 +0100
Re: [PATCH] ipc/msg: Implement lockless pipelined wakeups Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2015-11-03 15:20 +0100
Re: [PATCH] ipc/msg: Implement lockless pipelined wakeups Manfred Spraul <manfred@colorfullife.com> - 2015-11-01 05:40 +0100
Re: [PATCH] ipc/msg: Implement lockless pipelined wakeups Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2015-11-03 16:00 +0100
csiph-web