From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4CFEC43381 for ; Thu, 4 Mar 2021 15:46:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AAF8D64F1C for ; Thu, 4 Mar 2021 15:46:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235535AbhCDPp1 convert rfc822-to-8bit (ORCPT ); Thu, 4 Mar 2021 10:45:27 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:45887 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235493AbhCDPpS (ORCPT ); Thu, 4 Mar 2021 10:45:18 -0500 X-IronPort-AV: E=Sophos;i="5.81,222,1610406000"; d="scan'208";a="496144963" Received: from lfbn-idf1-1-708-183.w86-245.abo.wanadoo.fr (HELO mp-66156.home) ([86.245.159.183]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Mar 2021 16:44:35 +0100 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: XDP socket rings, and LKMM litmus tests From: maranget In-Reply-To: <20210303202246.GC1582185@rowland.harvard.edu> Date: Thu, 4 Mar 2021 16:44:34 +0100 Cc: "Paul E. McKenney" , =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= , bpf , LKML , Andrea Parri , Will Deacon , Peter Zijlstra , Boqun Feng , Nicholas Piggin , David Howells , "Alglave, Jade" , Akira Yokosawa , Daniel Lustig , joel@joelfernandes.org, =?utf-8?Q?Toke_H=C3=B8iland-J=C3=B8rgensen?= , "Karlsson, Magnus" Content-Transfer-Encoding: 8BIT Message-Id: References: <20210302211446.GA1541641@rowland.harvard.edu> <20210302235019.GT2696@paulmck-ThinkPad-P72> <20210303171221.GA1574518@rowland.harvard.edu> <20210303174022.GD2696@paulmck-ThinkPad-P72> <20210303202246.GC1582185@rowland.harvard.edu> To: Alan Stern X-Mailer: Apple Mail (2.3654.60.0.2.21) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On 3 Mar 2021, at 21:22, Alan Stern wrote: > >>> >>> Local variables absolutely should be treated just like CPU registers, if >>> possible. In fact, the compiler has the option of keeping local >>> variables stored in registers. >>> >>> (Of course, things may get complicated if anyone writes a litmus test >>> that uses a pointer to a local variable, Especially if the pointer >>> could hold the address of a local variable in one execution and a >>> shared variable in another! Or if the pointer is itself a shared >>> variable and is dereferenced in another thread!) >> >> Good point! I did miss this complication. ;-) > > I suspect it wouldn't be so bad if herd7 disallowed taking addresses of > local variables. > > Herd7 does disallow taking addresses of local variables. However, such tests can still be run on machine, provided function bodies are accepted by the C compiler. —Luc