From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.devel Subject: Re: master 8c81818673a 6/7: Tune volatile in read_char Date: Mon, 19 Aug 2024 16:01:31 +0000 Message-ID: <87le0scxig.fsf@protonmail.com> References: <172386820621.30556.15409337288904485218@vcs2.savannah.gnu.org> <20240817041648.A6687C2BC66@vcs2.savannah.gnu.org> <87f24fac-aa71-499f-a398-2bad70a0ca42@cs.ucla.edu> <8634n0y2th.fsf@gnu.org> <87plq4cyuj.fsf@protonmail.com> <861q2ky0tg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5173"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acorallo@gnu.org, eggert@cs.ucla.edu, emacs-devel@gnu.org, stefankangas@gmail.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 19 18:14:27 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sg51V-00019Y-Sy for ged-emacs-devel@m.gmane-mx.org; Mon, 19 Aug 2024 18:14:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sg50f-00009l-EA; Mon, 19 Aug 2024 12:13:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sg4pA-0000qP-V9 for emacs-devel@gnu.org; Mon, 19 Aug 2024 12:01:40 -0400 Original-Received: from mail-40131.protonmail.ch ([185.70.40.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sg4p8-0006Jf-I6; Mon, 19 Aug 2024 12:01:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1724083295; x=1724342495; bh=I80gcvdvyBHbxppuUXBvDY0qxJA7xxa0Ofsf4U6tedc=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=R0ycmccrT/8Z0DJwkWVD8ymDviPM8fsyyQJ+j2wUI8/JFv0mQhLxjKM0MOpUYUaES 2F5icqqJoMoUnOHma+TXzXFcOoQPeITdbExr5Q2QX0ReOAQdCsMirb87GoQGFb8c9j j7fNyXtCu9QZki9WF1ReIQTdpOjgbTiNtKuJA/ea5iQA+DSZvHCwtqKdnzliFOOVzz JvnONSJsFgEOQ3+BQjry4pUxc/KicIXv/lWN1JJNvPFhh2D2lKnYc3J0LWmZ8oSbKJ V1okv44NLFwYj/l+MkgvWLjj7DcRyUyMbGEUQfnwzpa7IU2DajwL9igRT+GJoptxw5 W/x07IS57MtaQ== In-Reply-To: <861q2ky0tg.fsf@gnu.org> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 82d8f74029af2975f6b7cebf2826fe6730229acd Received-SPF: pass client-ip=185.70.40.131; envelope-from=pipcet@protonmail.com; helo=mail-40131.protonmail.ch X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 19 Aug 2024 12:13:19 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:322935 Archived-At: "Eli Zaretskii" writes: >> Date: Mon, 19 Aug 2024 15:32:40 +0000 >> From: Pip Cet >> Cc: Andrea Corallo , eggert@cs.ucla.edu, emacs-devel@g= nu.org, stefankangas@gmail.com >> >> "Eli Zaretskii" writes: >> >> >> Don't know what the other maintainers think about this but FWIW I don= 't >> >> like this change (and similar ones). Our codebase is already >> >> sufficiently tricky and convoluted, complexifying code for no observa= ble >> >> improvements should be IMO out of our goals. >> > >> > I tend to agree. Especially given that the rationale for this >> > juggling and why exactly we assign and re-assign these two variables >> > in those particular places is nowhere to be found, neither in the >> > source code nor in the commit log message. >> >> Could we measure the performance impact of making all stack variables in >> functions that call setjmp() volatile? > > Why would that be useful? (Many/most of them already are volatile.) Because we will run into further setjmp()-related bugs if we don't do it, and because we could then stop putting effort into deciding under which delicate circumstances we can make them non-volatile (which is fun, I understand that). > In any case, this is not what this thread is about, so let's not mix > together unrelated issues. This thread is about how to deal with automatic variables in setjmp()-calling functions, either duplicating them into a 'c_volatile' / 'c' pair, as Paul's patch did, or keeping a single volatile variable. I think "let's make all of them volatile" is an obvious simplification of that idea. Pip