Date: Wed, 17 Sep 2014 21:38:19 +0400 From: Andrey Chernov <ache@freebsd.org> To: Alexander Motin <mav@FreeBSD.org>, Alan Cox <alc@rice.edu>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r271707 - stable/10/sys/kern Message-ID: <5419C70B.4010209@freebsd.org> In-Reply-To: <5419C67F.90808@FreeBSD.org> References: <201409171406.s8HE6LNu071461@svn.freebsd.org> <5419B3E1.1090703@freebsd.org> <5419BAD7.4000600@FreeBSD.org> <5419BFF9.9080907@rice.edu> <5419C67F.90808@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 17.09.2014 21:35, Alexander Motin wrote: > On 17.09.2014 20:08, Alan Cox wrote: >> 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." > > Yes, that was my intention. Thank you. Please excuse my non-native > English and correct it as you feel better. > > Andrey, would that reveal your questions? Sound nice for me, commit, please. > >>>> 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(). > -- http://ache.vniz.net/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5419C70B.4010209>