From owner-svn-src-all@FreeBSD.ORG Wed Sep 17 17:08:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26F7BB5E; Wed, 17 Sep 2014 17:08:12 +0000 (UTC) Received: from pp1.rice.edu (proofpoint1.mail.rice.edu [128.42.201.100]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4BD9A58; Wed, 17 Sep 2014 17:08:11 +0000 (UTC) Received: from pps.filterd (pp1.rice.edu [127.0.0.1]) by pp1.rice.edu (8.14.5/8.14.5) with SMTP id s8HH2gbr008670; Wed, 17 Sep 2014 12:08:10 -0500 Received: from mh3.mail.rice.edu (mh3.mail.rice.edu [128.42.199.10]) by pp1.rice.edu with ESMTP id 1peewq11dr-1; Wed, 17 Sep 2014 12:08:10 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh3.mail.rice.edu, auth channel Received: from 108-254-203-201.lightspeed.hstntx.sbcglobal.net (108-254-203-201.lightspeed.hstntx.sbcglobal.net [108.254.203.201]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh3.mail.rice.edu (Postfix) with ESMTPSA id 134CE403F5; Wed, 17 Sep 2014 12:08:10 -0500 (CDT) Message-ID: <5419BFF9.9080907@rice.edu> Date: Wed, 17 Sep 2014 12:08:09 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Alexander Motin , Andrey Chernov , 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 References: <201409171406.s8HE6LNu071461@svn.freebsd.org> <5419B3E1.1090703@freebsd.org> <5419BAD7.4000600@FreeBSD.org> In-Reply-To: <5419BAD7.4000600@FreeBSD.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=3 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1409170139 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Sep 2014 17:08:12 -0000 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(). >