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 EF541208A8 for ; Mon, 18 Mar 2024 04:45:46 +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=1710737148; cv=none; b=L9bDaOdsWpDRBkLoPcNHodQDVHodTe2j5HlRZlS9oVfKUde/BHdXX80bPU7fgAzoSBW7wbvKuss2OC0PTBbycuPPjrkrveG5ElnPkzbLFak5oyQtW43OjQDRXXbNK+vBXkT6mOLAi8kaaA4Sz29OOKV761tF63gC2iwAEErpZAc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710737148; c=relaxed/simple; bh=7NpkaqBrHMd9Na4XFmUpjp9VP9/Eley9jnp+kcL/ggc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=jcE0PcMWeL1hweqPbNl1UVQmspCsD+kEMOnEQs85Ss8gZHi49++RJKcPetGvDXd4T8q5EfyIqRyh2snADsdKdCAo5eOO9C+SlSQ8eSWQDjnWAVwRVsd9X5ACzHMPG7TxWX0lpr9ADIit30lANQ+JK/JkUdgDPwwwgDK4DxFtp0M= 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=iVwTiHrM; 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="iVwTiHrM" 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=mnaN8dTYqOgHCv0/cCFQNY6fVOedwk1iHmrndbOnalU=; b=iVwTiHrMkMttXYpVKL8+YyMc4d 5ENGMupX8I58G74Rv3/OPmMLK502cyqrNeoT7a7DXdd/Mi40lio0veBHsN9I8V1zom6g4k9NYNbEC v9qwjdmAKzDbxoFAAgnaDNs0TwYPt75daz5c8CIeVqjNmabsPzhtQR0wWMNOu4piC3MS98whqJ+Vm JhgscbIQezd3zeq8+SZFigcIgUGvwxys9kJWamXPkAT9DtNtO/BX1PeK1OrCw1KIiei5tocv5NqgV 5FzUVw+gwIIYvSJcQ+5E3CEsc0YzxtNwveQgNHXD87VQaPcwxO5k3xB6fDuyGNjW8txTwXzQNBPKM Amh0sflQ==; 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 1rm4sb-00000007Gou-2SGe; Mon, 18 Mar 2024 04:45:46 +0000 Message-ID: <83c8bb94-f0dd-498a-95e5-2dde728c0294@infradead.org> Date: Sun, 17 Mar 2024 21:45:45 -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 Cc: Linus Torvalds , 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> <1b4b1760-d571-4559-80d4-f7202c8efb4a@infradead.org> <92faa027-bdad-4e8d-b6bf-3f7f008316f8@paulmck-laptop> From: Randy Dunlap In-Reply-To: <92faa027-bdad-4e8d-b6bf-3f7f008316f8@paulmck-laptop> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 3/17/24 21:42, Paul E. McKenney wrote: > On Sun, Mar 17, 2024 at 07:57:31PM -0700, Randy Dunlap wrote: >> >> >> 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? > > So was I. Yet in the late 1970s, I attended a talk by a guy named > Edsger Dijktra with examples claiming that you could not trust ordinary > developers to correctly write "while" loops. Sort of like some people > today claim that ordinary developers cannot be trusted to write concurrent > code. > > Of course, one might reasonably argue that developers cannot be trusted > to write much of any code at all. Some days I would agree. ;-) Ack that. -- #Randy