From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 17 17:38:29 2014 Return-Path: Delivered-To: svn-src-stable-10@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 D042394E for ; Wed, 17 Sep 2014 17:38:29 +0000 (UTC) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com [209.85.215.51]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 51C5BDA8 for ; Wed, 17 Sep 2014 17:38:28 +0000 (UTC) Received: by mail-la0-f51.google.com with SMTP id gi9so2289696lab.24 for ; Wed, 17 Sep 2014 10:38:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=zkua6EMUhsBgXXmFXawiGTlmuq/Vibpu5iV51L7udMs=; b=L77IQXzeHi/4FYR7p4rADOP8gGlJyaD1D0tHYL+72B7TGoJ8LEpfALueqeUjlfSoY/ JPlEjHA5wo9u9dX5ig52my6M7YUu+OXKxNfzj667ZTndiXHwN7BlLEPGiuVJF6W58kg+ Uhmg7dN3RdjEK30e07r1ovs+5fxK7VkFLgCPrdXA7PY9TlUpUDp7jv3JBgrpGLnP4BSP gN7XEfr9iCgyMACxbDwH5vziFemW8/7QQ76HnNqgzQI8S366k21lkfASX9vfL70YYvMd iB7U5bThgDZmzEuqQJJ7kJTzR/vC/Ocktz1VmnuW2oyKpWMv9SIvSC9yQrOvAfvJWegD PZwQ== X-Gm-Message-State: ALoCoQl65AP1rQRVFd0QMTopBZE20aogn1TgrnKTa3dUIjLYPiRnFqNnh6l1nUVVnpopc3o3lixo X-Received: by 10.112.13.132 with SMTP id h4mr15849484lbc.45.1410975500870; Wed, 17 Sep 2014 10:38:20 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id bm4sm5867216lbc.22.2014.09.17.10.38.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Sep 2014 10:38:20 -0700 (PDT) Message-ID: <5419C70B.4010209@freebsd.org> Date: Wed, 17 Sep 2014 21:38:19 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: Alexander Motin , Alan Cox , 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> <5419BFF9.9080907@rice.edu> <5419C67F.90808@FreeBSD.org> In-Reply-To: <5419C67F.90808@FreeBSD.org> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Sep 2014 17:38:29 -0000 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/