svn commit: r271707 - stable/10/sys/kern
Alan Cox
alc at rice.edu
Wed Sep 17 17:08:12 UTC 2014
On 09/17/2014 11:46, Alexander Motin wrote:
> On 17.09.2014 19:16, Andrey Chernov wrote:
>> On 17.09.2014 18:06, Alexander Motin wrote:
>>> + /*
>>> + * Make sure that tdq_load updated before calling this function
>>> + * is globally visible before we read tdq_cpu_idle. Idle thread
>>> + * accesses both of them without locks, and the order is important.
>>> + */
>>> + mb();
>>> +
>>> if (TD_IS_IDLETHREAD(ctd)) {
>> I don't understand this comment's first phrase with two verbs. Copy &
>> paste result?
> No, only possibly missing commas around "updated before calling this
> function".
Commas alone don't fix the problem. I think what you're trying to say is:
"Make sure that our caller's earlier update to tdq_load is globally
visible before we read tdq_cpu_idle."
>> I also don't see tdq_load access in this function.
> It is incremented by tdq_load_add(), called by tdq_add(), called by
> sched_add(), just before calling tdq_notify().
>
More information about the svn-src-stable-10
mailing list