Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1262240
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] ipc/msg: Implement lockless pipelined wakeups |
| Date | 2015-11-04 13:10 +0100 |
| Message-ID | <qr534-eP-19@gated-at.bofh.it> (permalink) |
| References | <qqLnI-4ku-29@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Nov 03, 2015 at 04:03:29PM +0100, Sebastian Andrzej Siewior wrote:
> @@ -932,58 +924,26 @@ long do_msgrcv(int msqid, void __user *buf, size_t bufsz, long msgtyp, int msgfl
> rcu_read_lock();
>
> /* Lockless receive, part 2:
This is a broken comment style, please fix that while you're there
anyway.
Also, the comment above ("Lockless receive, part 1:") is broken
too, not only in style, but it refers to rcu_read_unlock() as disabling
preemption, and avoiding preemption, which is false.
> + * The work in pipelined_send() and expunge_all():
> + * - Set pointer to message
> + * - Queue the receiver task for later wakeup
> + * - Wake up the process after the lock is dropped.
> *
> + * Should the process wake up before this wakeup (due to a
> + * signal) it will either see the message and continue ...
> */
>
> + msg = msr_d.r_msg;
Since this is a lockless read, it should very much be READ_ONCE(), esp.
since you killed the volatile on its type.
--
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 | Find similar | Unroll thread
[PATCH v2] ipc/msg: Implement lockless pipelined wakeups Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2015-11-03 16:10 +0100
Re: [PATCH v2] ipc/msg: Implement lockless pipelined wakeups Davidlohr Bueso <dave@stgolabs.net> - 2015-11-03 18:40 +0100
Re: [PATCH v2] ipc/msg: Implement lockless pipelined wakeups Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2015-11-03 21:20 +0100
Re: [PATCH v2] ipc/msg: Implement lockless pipelined wakeups Davidlohr Bueso <dave@stgolabs.net> - 2015-11-04 19:20 +0100
Re: [PATCH v2] ipc/msg: Implement lockless pipelined wakeups Peter Zijlstra <peterz@infradead.org> - 2015-11-04 13:00 +0100
Re: [PATCH v2] ipc/msg: Implement lockless pipelined wakeups Davidlohr Bueso <dave@stgolabs.net> - 2015-11-04 18:40 +0100
Re: [PATCH v2] ipc/msg: Implement lockless pipelined wakeups Peter Zijlstra <peterz@infradead.org> - 2015-11-04 13:10 +0100
csiph-web