From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Emacs design and architecture. How about copy-on-write? Date: Tue, 19 Sep 2023 20:57:30 +0800 Message-ID: <87msxiuxqd.fsf@yahoo.com> References: <83edizjn0v.fsf@gnu.org> <0518f65b-1dd1-6923-8497-da4d3aeac631@gutov.dev> <87sf7fc7kd.fsf@dataswamp.org> <834jjuk68t.fsf@gnu.org> <87cyyhc7uu.fsf@dataswamp.org> <83ttrsg9nx.fsf@gnu.org> <83h6nrg4eg.fsf@gnu.org> <83v8c7elan.fsf@gnu.org> <877conk5ny.fsf@localhost> <83ttrreeu0.fsf@gnu.org> <87bkdzeas1.fsf@localhost> <83cyyfe5l8.fsf@gnu.org> <8734zbyu6o.fsf@dataswamp.org> <835y46e8o9.fsf@gnu.org> <87zg1ixvnc.fsf@dataswamp.org> <83sf7acp86.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29432"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Emanuel Berg , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 19 14:58:58 2023 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 1qiaJb-0007KG-RJ for ged-emacs-devel@m.gmane-mx.org; Tue, 19 Sep 2023 14:58:55 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qiaIj-0001w1-VJ; Tue, 19 Sep 2023 08:58:01 -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 1qiaIZ-0001sx-5G for emacs-devel@gnu.org; Tue, 19 Sep 2023 08:57:55 -0400 Original-Received: from sonic310-23.consmr.mail.ne1.yahoo.com ([66.163.186.204]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qiaIQ-0006kP-Hk for emacs-devel@gnu.org; Tue, 19 Sep 2023 08:57:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1695128259; bh=/G5YPUFFsZ4LvDum/sYeYQX6sn5kLp/EC/JnAua+NNM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=Vn9Vl7V8tX36AEzvo60coMn6ZkvpFyXZJD2U0q6RdUXz2XQf1vAXGPWYKP4dJeZFNVSWXu7RweiR9kRnGsJNu9aDnR4FP0JCBihHea+vefeYBIrx6ZXZ5u6ZaVU3jh2s9YdqgtFg3cKiU/Xi7M0WbwywMypo4y2O4zOavr1UpzUH1xVxlPDarRKserhZkyKeZA9sWjHalVC28NqHV5D4Y4/XXlkiEY+n6SLiQuv9M3PBxNwnMvWpH+WXSNliXEjlg/1XLlvlCF0rh8qEnXiu2Jna53pF1o3bnNLv/G7rH9TeplE1ShdRTvhQC1b5ks4x/oue6sADxWG7Rg5uUJvMmA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1695128259; bh=bzwmWkuBcrFqfm/pZ4MYlBEQHbnoYEgxdcToZmxToQi=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=gjUYUaoUm/gzOopONZ++aF5zqhje3q+bf1AE4n5dfjC93NZYRRA2PrROu6kfzDLZPyh3643I0QCq2NLy+ZFd3o9q9370heGmU8Ik4GZ2MH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oURJaFzCwkRHe04kvQQrfhtatEErg.fz4tU X-Sonic-MF: X-Sonic-ID: 7f1bb458-af5f-4e03-a3c7-560de3c4c944 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.ne1.yahoo.com with HTTP; Tue, 19 Sep 2023 12:57:39 +0000 Original-Received: by hermes--production-sg3-55c667b499-f87gm (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID dc608c563bdd658fd2090f56461acce7; Tue, 19 Sep 2023 12:57:36 +0000 (UTC) In-Reply-To: <83sf7acp86.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 19 Sep 2023 15:38:33 +0300") X-Mailer: WebService/1.1.21797 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.186.204; envelope-from=luangruo@yahoo.com; helo=sonic310-23.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:310758 Archived-At: Eli Zaretskii writes: > If we need to lock 99.99% of Emacs "single" variables, it is easier to > lock everything. Faster, too. Interlocking variables is not necessary. Extant buses guarantee that word-sized (Lisp_Object) writes and reads from one CPU are always coherently propagated to other processors. And otherwise, interlocking every global variables would incur an extreme performance penalty; two extra load-locked / store-conditional pairs (or interlocked instructions) for each read or write at the minimum. Interlocking Lisp_Objects themselves is only mandatory under wide int builds, where the size of each object is larger than the machine's word size. Supporting such builds in a multiprocessing Emacs will be an extreme burden that I don't think we should shoulder.