Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp423545pxu; Tue, 6 Oct 2020 09:33:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOTRWI5dwqibrbOQzSuu3ZtFHkSpsMnVPeun5G80Bt1CsrsPKBZRCrUqh9z2T2ZVdtJOi0 X-Received: by 2002:a50:cbc9:: with SMTP id l9mr6329164edi.310.1602001987852; Tue, 06 Oct 2020 09:33:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602001987; cv=none; d=google.com; s=arc-20160816; b=h2/xzVvHUubJp0+xiZa6Y6pziiDsE6mLbMTl45A9vUi3jp/TeSE89b/6GnZEcJf7IY /Bnz/RnLKGpWi57v5Yo6z5wJNyWbgWQS5XkYrcNnzefiaA9HricCH8ZAXwahhvWhT+pc 1dm2iNRtTwvjxJyMf4gmoJdptMhR0cDkK5WqN2Ls+Lqt6CQCbmC+FrVzYqIzPOu0ht2a OW0s6ZkxagZDvsUKfOcVfBSfNji94N5kCl5XrUT979rD3/KF5kB+OM4xVZEAkgwB8ZWn Dsdx432trJmtqZQ4BbSUoWiKywn8hUlq+jsTkM7KLDPaLrOiK9AiQ/nGwrzMPTAJHEAO wlqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=IQ/Qss6NjmR3Bd1n091w0uZn0sL0XHRyo6QojJXlmUY=; b=HkH69urQWLz4rUpfy7Ru/uTn2WKUcBJpdXMYC6b+CJ7NcTl5i/9ag1HIA/XQA8gegI THCav2jj9MPCA8AbiwHylPKG5kBMMuaSrvnvRyqpPi+yAaVLZeG86qQ5FLFXCWoDlS4i pCA1HYkHZiCVbp9Zgx2NVXouTdfBjFNtOQsq6NTX/pJaMAcyjVzRQtLBvmBt+Rec3bKi Fd+UnVLQDyCPkR7i8tp/bT0i0K+YeKyFOuPdzZaOV+iWZY7LxnoJfCpkcUEBIpKEXdVX 6QQF7+s2aXDugZhkCgaaT3nhPqjlw5EJ5c+Cao1yz+OePwu+FL7CogK69lKhJC2vOuJc RCNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=003U3Pkv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z8si3355869edp.90.2020.10.06.09.32.43; Tue, 06 Oct 2020 09:33:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=003U3Pkv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725981AbgJFQbn (ORCPT + 99 others); Tue, 6 Oct 2020 12:31:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:52352 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725769AbgJFQbm (ORCPT ); Tue, 6 Oct 2020 12:31:42 -0400 Received: from paulmck-ThinkPad-P72.home (50-39-104-11.bvtn.or.frontiernet.net [50.39.104.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0A795206D4; Tue, 6 Oct 2020 16:31:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602001902; bh=UpTHNxjdnsj8TgKoTSSXVTK2r7XIFDxf771SyhlBE+U=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=003U3PkvGOfhsJOMBHouRbSNQ669xi3ttbviOpgNQfrtVRhCa1j6GHyxLxSIRph21 pPF8gFu8fDUG6v3g8A9aEY+38e0BRSxPyWPKAnDFascx1OZaVPDKeqIKK7sgzpnQTf JDwbNwMh6NqJuz+HrEnFpxLqZ9X8v2dVWQWOXo0E= Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id BE4283520A8C; Tue, 6 Oct 2020 09:31:41 -0700 (PDT) Date: Tue, 6 Oct 2020 09:31:41 -0700 From: "Paul E. McKenney" To: David Laight Cc: 'Willy Tarreau' , 'Nick Clifton' , Peter Zijlstra , "stern@rowland.harvard.edu" , "linux-toolchains@vger.kernel.org" , Will Deacon , "linux-kernel@vger.kernel.org" , "parri.andrea@gmail.com" , "boqun.feng@gmail.com" , "npiggin@gmail.com" , "dhowells@redhat.com" , "j.alglave@ucl.ac.uk" , "luc.maranget@inria.fr" , "akiyks@gmail.com" , "dlustig@nvidia.com" , "joel@joelfernandes.org" , "torvalds@linux-foundation.org" Subject: Re: Control Dependencies vs C Compilers Message-ID: <20201006163141.GK29330@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org References: <20201006114710.GQ2628@hirez.programming.kicks-ass.net> <3dfe7daed3c44f46a6989b6513ad7bb0@AcuMS.aculab.com> <20201006133115.GT2628@hirez.programming.kicks-ass.net> <20201006142324.GB416765@rowland.harvard.edu> <20201006144302.GY2628@hirez.programming.kicks-ass.net> <47bfda8f-304e-5283-c6d6-0753037b0b2c@redhat.com> <1dabfd1939f348198678121f94d6c9b2@AcuMS.aculab.com> <20201006155052.GJ29330@paulmck-ThinkPad-P72> <20201006161039.GF5822@1wt.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 06, 2020 at 04:22:10PM +0000, David Laight wrote: > From: Willy Tarreau > > Sent: 06 October 2020 17:11 > > > > On Tue, Oct 06, 2020 at 08:50:52AM -0700, Paul E. McKenney wrote: > > > Comparing 25+ assembly languages to but two compilers most definitely > > > motivates looking hard at doing something with the compilers. > > > > +1, especially since the kernel is not special; anyone working with > > threads faces the same issues in userland, which are often hidden > > behind the implicit whole-memory clobbers of certain operations or > > the call to mutex manipulation functions, but which become a reality > > again as soon as you go slightly away from these and try to use > > lockless mechanisms. > > AFAICT most windows and android apps completely ignore the problem > of thread locking - which is why the crash and lock up all the time :-) > > I've spent most of the day looking at some library traces from a > customer bug. > I almost suspect a bug in the pthread mutex code on their system. > They are using a nice, modern, 3.10.0-957.el7.x86_64 kernel. It would be good if the compiler were more helpful! Failing that, if -something- could be more helpful!!! Thanx, Paul