From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8AC401CD23 for ; Mon, 18 Mar 2024 02:57:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710730656; cv=none; b=ETCGJqulgHBNCXXVhRawdSh74F7oSzVade5bnwkRcRFkwy12mziERSSxsG6IuJDUmeOtJEjwVhV56IVN1QPVYSRVu3Ukm6Af7TifgAQZIVcq+sWQ5jYWLLC0C47LAcQXkdZEMbmSxg+wjfKukWaCO/d87p6iXL7LJUDpYiSumBs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710730656; c=relaxed/simple; bh=AvUaurVgYMjsKcRJRdAqVMhRPtzXwm5iaAY29eTKrqA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=tQAEjc+DSHJvhOKoKeGnT9xk4GDS9oJkm81GbqJ2bXhYM+Xm9jBEEjSezLCRlIoqICjCIUjhyrd5Pv5mcVhpE7I5dcKSfaDmvMZtmnhD+Uc+TZYtXsUxTbjH60BBJwX6285fpUJDk9jJbmYf/82Y1UAdINXYmCD72nnQ5HVLugE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=UG0md91h; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="UG0md91h" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=Lgn6Di4D92IK6ZNNqfErd0tssnzlhtPgE238hKK191M=; b=UG0md91hAt9VC0TlPIZjINShDh 8PtcIhPOS5fBASQvg8++6WEm2kDYL+7ef7N47BTtM20eTrHaUtbVMz0HTBu4CDvWK3+nrpjabLIsC elV8m5mVGqbvG1lUus9tXqduKhJRhlFyvA8MPetuS2XImt5QR4lzOkcX3U8KFDhAmbLSEeMFEXqnV mN7UxsT2/XDzLZAKuTF1jUF9CWnXKPIoDeywF8yMYiA4idpCzDH2rrSVIa0RbbrkLKi47AVDcCRwa 4+auAZcMWpSCM34p08q9RR+mjgfGtTD97sv4dsEtrNYaRnzzXrBaxr4uxuAhyjEcGkzHEzgFDpjR4 k4rts0Lg==; Received: from [50.53.2.121] (helo=[192.168.254.15]) by bombadil.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1rm3Bs-000000075Te-3erQ; Mon, 18 Mar 2024 02:57:33 +0000 Message-ID: <1b4b1760-d571-4559-80d4-f7202c8efb4a@infradead.org> Date: Sun, 17 Mar 2024 19:57:31 -0700 Precedence: bulk X-Mailing-List: linux-toolchains@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: A few proposals, this time from the C++ standards committee Content-Language: en-US To: paulmck@kernel.org, Linus Torvalds Cc: linux-toolchains@vger.kernel.org, peterz@infradead.org, hpa@zytor.com, rostedt@goodmis.org, gregkh@linuxfoundation.org, keescook@chromium.org References: <83f5e119-6e32-415a-a1c8-8e6b0bd11a75@paulmck-laptop> <25e38fde-ad0c-451e-8e42-6c328bea5a73@paulmck-laptop> <2de4028d-c2eb-46ea-b682-c1227ececbab@paulmck-laptop> From: Randy Dunlap In-Reply-To: <2de4028d-c2eb-46ea-b682-c1227ececbab@paulmck-laptop> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 3/17/24 19:44, Paul E. McKenney wrote: > On Sun, Mar 17, 2024 at 06:49:17PM -0700, Linus Torvalds wrote: >> On Sun, 17 Mar 2024 at 17:42, Paul E. McKenney wrote: >>> >>> On the other hand, there is much more awareness of concurrency in that >>> group than 20 years ago, so there is hope. >> >> Yeah. But when I say "compiler writers don't understand memory >> ordering", it's not that I think they need to be singled out - pretty >> much *nobody* understands it. > > Fair enough! > >> Christ, I'm supposed to know it fairly well, and I still get it wrong >> myself regularly and have to really think about it (and honestly just >> prefer leaning on a few standard patterns rather than having to think >> about it too much). >> >> So "awareness of concurrency" is one thing, and I agree it's getting >> much better. >> >> Actually getting memory ordering right - even when you are aware of >> concurrency - is another thing entirely. > > Agreed, myself included. So we should all use the standard patterns where > we can, getting ourselves into memory-model trouble when those patterns > are not cutting it. And over time, we add to the standard patterns. > > But we are making progress. Fifty years ago, the consensus was that > developers could not be trusted to get while-loop conditions right. ;-) I was using for loops and do-until loops 50 years ago, but maybe not "while" loops. Or are you off by 10 years or so? -- #Randy