From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#69706: 30.0.50; sort.c, unnecessary GC marking Date: Sun, 10 Mar 2024 14:38:38 +0100 Message-ID: <89F77444-2271-4A4D-8F3D-CB012E87AC7F@gmail.com> References: <86a5n6wew6.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) 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="38006"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Stefan Monnier , 69706@debbugs.gnu.org To: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 10 14:40:50 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1rjJQ2-0009nL-6v for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Mar 2024 14:40:50 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rjJPh-0001aY-Qd; Sun, 10 Mar 2024 09:40:29 -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 1rjJPh-0001aO-2h for bug-gnu-emacs@gnu.org; Sun, 10 Mar 2024 09:40:29 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rjJPg-00070C-Qr for bug-gnu-emacs@gnu.org; Sun, 10 Mar 2024 09:40:28 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rjJQD-0006jP-Mk for bug-gnu-emacs@gnu.org; Sun, 10 Mar 2024 09:41:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Mar 2024 13:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69706 X-GNU-PR-Package: emacs Original-Received: via spool by 69706-submit@debbugs.gnu.org id=B69706.171007802125780 (code B ref 69706); Sun, 10 Mar 2024 13:41:01 +0000 Original-Received: (at 69706) by debbugs.gnu.org; 10 Mar 2024 13:40:21 +0000 Original-Received: from localhost ([127.0.0.1]:35778 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjJPZ-0006hk-J4 for submit@debbugs.gnu.org; Sun, 10 Mar 2024 09:40:21 -0400 Original-Received: from mail-lj1-f181.google.com ([209.85.208.181]:51574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjJPX-0006hQ-Mk for 69706@debbugs.gnu.org; Sun, 10 Mar 2024 09:40:20 -0400 Original-Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-2d29aad15a5so32841591fa.3 for <69706@debbugs.gnu.org>; Sun, 10 Mar 2024 06:39:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710077920; x=1710682720; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=rQo2ysFLHaQHECpVOUyAuokW+Snn4Y0+wz0MFVwSzsM=; b=iHgqBCuY4+Y59oxujKa0FOHoJ7Uiv5eyFher/L9mN3epNR4ONBfFi0c6FvtpvABMtp imWr9EVv5m/yylLejw+pltYzRxpynVhG1ItZ0aI2qrooKwdEki+8ZQZbsTWLtSMtPQUR ys0XJ9ZLTsUOJIWqao8mFcGYkMN2rkCoxi2uInc6X+LPEgsKnM3XDDckUCWt7YEEpESy yHr4SUJL1E1sAx0Ql7vnGEXbIgZUiAfuaUQqmf0J7KtTd52WYbF4e2mP82l4ZZ5H4z+Y h2n8Z42oyr2IeK6iW/bJaTYZpWeXLsDpIkBjBMQBI9Frnwb/cA3yZVkH+d3wEmmHpdgf fZSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710077920; x=1710682720; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=rQo2ysFLHaQHECpVOUyAuokW+Snn4Y0+wz0MFVwSzsM=; b=oELkKMiCDo2GRwlyBj9lCe8Ss3QdFvAYJ0p3JKmcvGCmKK6TGvuGIWr1MdIkf0BLCG nY2SW0HZ0TRmZFgZXOcT8r8Nsna991MSKJsCti2UESjNbR4KtRaCKbAg1rJnGByFSrXM yAky/hwaSGtqxJtipatTZecCiz4Fk59JnKODzoilOrPSPYrmLEqgIKk+pqjQ3aFjC2K2 /r94L/1CtsSc7zMN09hrqab6WQPkTLsud8huLNjwOho0deEzZZeagXsUbu3f8W6bwVn5 zcrI5DI14WJLDnL0j7dx+1usDYcacGknYfdTu1Qh/WbZIKH0J4vVyCoeXLN+Zz7nmjoj /R1w== X-Forwarded-Encrypted: i=1; AJvYcCVjnJq/gtxPhK16tXJTnHwMjXQyRRDOWgKXq9g+PgnrZC/ahzVQwkvFPMJTN8kwrQ7pTioMxUFoBBkHlB3Yzj0zFft77PU= X-Gm-Message-State: AOJu0Ywl80ISxFHuuSrlJ92treGV9q7imbiMjAnTOdP/h2R4+r83hmdN 7XShb6DH+j/lUbewyrDLZrdGrDy5FPI2ErGolUiTrtj4IahvFT// X-Google-Smtp-Source: AGHT+IHR5OomoBYsrqRlLqdHjUpDtsMnZlXHgtjdjrW+YO1WWDBRYJ7T/6Ko1TNjTJtmEj42k149Wg== X-Received: by 2002:a2e:a26f:0:b0:2d2:2b78:70eb with SMTP id k15-20020a2ea26f000000b002d22b7870ebmr2537728ljm.21.1710077920308; Sun, 10 Mar 2024 06:38:40 -0700 (PDT) Original-Received: from smtpclient.apple (c80-217-1-132.bredband.tele2.se. [80.217.1.132]) by smtp.gmail.com with ESMTPSA id b13-20020a05651c032d00b002d43abe7820sm117323ljp.139.2024.03.10.06.38.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Mar 2024 06:38:39 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3654.120.0.1.15) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:281394 Archived-At: 10 mars 2024 kl. 12.29 skrev Gerd M=C3=B6llmann = : > You nean sort.c is removing objects temporarily from the vector, so = that > they are not reachable from any other root, especially from the = control > stack? Could be, the code is a bit hard to follow. The comment in cleanup_mem is explicit about this: > /* If we have an exception while merging, some of the list elements > might only live in temp storage; we copy everything remaining in > the temp storage back into the original list. This ensures that > the original list has all of the original elements, although > their order is unpredictable. */ > Please make it easy for a concurrent, mostly-copying GC, use the stack We can't use the C stack for allocations of arbitrary size, = unfortunately. Furthermore, we currently make the (correct) assumption that explicit = xmalloc/xfree for temporary storage is faster than allocating a Lisp = vector in most places. If a new GC shrinks the performance gap = sufficiently, then we could reconsider that. See bug#69709 for the new `sort` plan.