tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Anomalies while handling p_nstopchild count
Date: Tue, 13 Oct 2015 02:27:47 +0000
From: Taylor R Campbell <campbell+netbsd-tech-kern%mumble.net@localhost>
Message-ID: <20151013022635.578F5607B8%jupiter.mumble.net@localhost>
| In this case, and generally[*], you need a membar_consumer matching
| the membar_producer in order for the latter to have any useful effect.
OK, understood (your example code had two lines in the wrong order,
I believe, for the effect you intended, but that doesn't matter.)
| (b) There's a missing membar_consumer in find_stopped_child and in
| proc_reparent (but maybe it doesn't matter on x86, if all current
| implementations will not in practice reorder those loads).
It probably doesn't really matter anyway - the only effect would be to
defer find_stopped_child() noticing the stopped child in question until
its next iteration. Not good, but not fatal.
| (c) The write to p->p_waited in exit1 looks fishy: it holds p->p_lock,
| but not proc_lock.
It was fishy. That's the one Paul just fixed. It holds proc_lock
now (as of a couple of hours ago.)
kre
Home |
Main Index |
Thread Index |
Old Index