From unknown Fri Jun 20 07:18:47 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#69706 <69706@debbugs.gnu.org> To: bug#69706 <69706@debbugs.gnu.org> Subject: Status: 30.0.50; sort.c, unnecessary GC marking Reply-To: bug#69706 <69706@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:18:47 +0000 retitle 69706 30.0.50; sort.c, unnecessary GC marking reassign 69706 emacs submitter 69706 Gerd M=C3=B6llmann severity 69706 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 10 04:45:46 2024 Received: (at submit) by debbugs.gnu.org; 10 Mar 2024 08:45:46 +0000 Received: from localhost ([127.0.0.1]:35621 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjEoU-0006J0-3g for submit@debbugs.gnu.org; Sun, 10 Mar 2024 04:45:46 -0400 Received: from lists.gnu.org ([209.51.188.17]:35632) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjEoN-0006Ik-Ot for submit@debbugs.gnu.org; Sun, 10 Mar 2024 04:45:44 -0400 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 1rjEnq-0003am-Ak for bug-gnu-emacs@gnu.org; Sun, 10 Mar 2024 04:45:06 -0400 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rjEno-0002CC-Sw for bug-gnu-emacs@gnu.org; Sun, 10 Mar 2024 04:45:06 -0400 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a28a6cef709so310525066b.1 for ; Sun, 10 Mar 2024 00:45:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710060303; x=1710665103; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=7vdnrHkCGhIsvTYvc7B6Eaog0apPXEDCwhsdkfsfN8s=; b=l/DL1HwiVAGtYg9k2RZPt/LhbaMHl//hAB7YfAys5aJC9JrT0w6ToCGDkr6Dgi0J4x 1nwyKBhR64Ah3EOHo/sOeQMhSSpYqn9P7M2MFuVOrx4LdUj0iW06pmWS13iszqBbDd1+ RiTR74OuLmWqnow6GPGss5O2MYRUOevUGRa81EwReVAjarDnRCqlEZUoFNfy6SHh+NbT WOIrdLdQBII/hWq2otO8MxBZ0S+vkPu73jkQ+DQyDIOR9a6ZpVDIWYiJ3694BOZf9gCg P2Qw4TuZT0H+Zo+6meXxf5xap8HvnK+ds6n2kWxZxkJO/XpezpG7T+TkkjmgSW0e6nUP bBxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710060303; x=1710665103; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=7vdnrHkCGhIsvTYvc7B6Eaog0apPXEDCwhsdkfsfN8s=; b=qpXTvaQUfD31C/pWMu5s6PIcPYiq4GOJ9eScq4JUm4Br/n/6HynD0WPEs2mxIaYjM9 5cAkinbjA8m2yyZRc5o/t8WWbGKrRjHRHDNKjb6QNlIX/cbT3WaD7tKOIaOornAdmAPW GG5ICILnQAjF+1TZiH8qjB5+5w9l6b7clo0J7BB3xsJEdge3g8VxGXpWH511I9Kp87mC GQvYqEaUhIP7+ALkz70swqFdYSckE3QumsXXtx4uVmYEQoQ68Nj3U7uqB/aoKk011spl mg0guykKifWrklNJ5/MOdw30IKaVXO8WBOYLfeAwl/fQOUSqmy5lEUIVnNvacR9q7es0 bg/A== X-Gm-Message-State: AOJu0YxfuugnI65vy+me0RDw3BCOKjlNFauqUeCBJJ1IBIDvA8BMGZtP e5cCpq1XktKxxgH3Q8CLh6ge7Dw+sdn0yLtpaicnGdPe/wnT/2ajc2uSlqQR X-Google-Smtp-Source: AGHT+IH7ArUG3cFQD7VIL7cxLNKhEUpme24pSjVV6IAA55l2+C6y1/HPJuP7AFNe5eIhkgBdu/p5fA== X-Received: by 2002:a17:906:35ca:b0:a45:15d5:9267 with SMTP id p10-20020a17090635ca00b00a4515d59267mr2072493ejb.63.1710060302703; Sun, 10 Mar 2024 00:45:02 -0800 (PST) Received: from Pro.fritz.box (p4fe3aa30.dip0.t-ipconnect.de. [79.227.170.48]) by smtp.gmail.com with ESMTPSA id l20-20020a1709067d5400b00a46224d4442sm185836ejp.212.2024.03.10.00.45.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Mar 2024 00:45:02 -0800 (PST) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: bug-gnu-emacs@gnu.org Subject: 30.0.50; sort.c, unnecessary GC marking X-Debbugs-Cc: Date: Sun, 10 Mar 2024 09:45:01 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=gerd.moellmann@gmail.com; helo=mail-ej1-x633.google.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) sort.c uses record_unwind_protect_mark to let GC mark some objects in its merge_state structure, while GC marks the specpdl stack. This is - unnecessary because all the objects that are currrently extra protected by merge_markmem, are already seen by the GC, because these are the objects being sorted, which are protected in the usual way (marking the control stack, ...) - costs GC time - complicates the code I therefore suggest removing this, including the removal of record_unwind_protect_mark and the mark function pointer in union specbinding (sort.c is the only user). From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 10 06:39:03 2024 Received: (at 69706) by debbugs.gnu.org; 10 Mar 2024 10:39:03 +0000 Received: from localhost ([127.0.0.1]:35672 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjGa7-0006QT-4N for submit@debbugs.gnu.org; Sun, 10 Mar 2024 06:39:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52108) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjGa5-0006Pz-3q for 69706@debbugs.gnu.org; Sun, 10 Mar 2024 06:39:01 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rjGZR-0001Lc-RO; Sun, 10 Mar 2024 06:38:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=NkUtfDc64VTIrt9foZyXN2wdRSSss1uTWpkGJJd9oeY=; b=bZvGWrPCGx9/gC1PSd5a H3FUxGpIwKdC9hR9Vq96Wlhf3tmlIHEHzD6dFzfJZjCFf6X27vK2ObO9Qoz10wd9XfEd+/bwT+BOh Z3pp1TK5os7uRO60PlMJ8+PdDjNsXhfTC/HrRf3mFGAFUDixq5FjV2Ti0W2qBFrBFqZnxfzCAH3Yt GvNmonV6DJVZRIqbIaOslOe4ZtGS2qYC9C35IOwrmFbYypw9blN91Hg0C5mLuWNDk13qun8kQ+bPV xSowFjc+w5bTSSThCuR467S9gtO5OeqIQ73RHmOFC47EFc5jA36hiswO6Ei0vItM9QKDc7UpCemw7 YLCq51uCtwkFjA==; Date: Sun, 10 Mar 2024 12:38:17 +0200 Message-Id: <86a5n6wew6.fsf@gnu.org> From: Eli Zaretskii To: Gerd =?utf-8?Q?M=C3=B6llmann?= , Mattias =?utf-8?Q?Engdeg=C3=A5rd?= , Stefan Monnier In-Reply-To: (message from Gerd =?utf-8?Q?M?= =?utf-8?Q?=C3=B6llmann?= on Sun, 10 Mar 2024 09:45:01 +0100) Subject: Re: bug#69706: 30.0.50; sort.c, unnecessary GC marking References: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 69706 Cc: 69706@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Gerd Möllmann > Date: Sun, 10 Mar 2024 09:45:01 +0100 > > sort.c uses record_unwind_protect_mark to let GC mark some objects in > its merge_state structure, while GC marks the specpdl stack. > > This is > > - unnecessary because all the objects that are currrently extra > protected by merge_markmem, are already seen by the GC, because these > are the objects being sorted, which are protected in the usual way > (marking the control stack, ...) > > - costs GC time > > - complicates the code > > I therefore suggest removing this, including the removal of > record_unwind_protect_mark and the mark function pointer in union > specbinding (sort.c is the only user). Can you show the patch, please? Adding Stefan and Mattias to the discussion, in case they have comments or suggestions. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 10 06:53:24 2024 Received: (at 69706) by debbugs.gnu.org; 10 Mar 2024 10:53:24 +0000 Received: from localhost ([127.0.0.1]:35687 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjGo0-0006s7-Dl for submit@debbugs.gnu.org; Sun, 10 Mar 2024 06:53:24 -0400 Received: from mail-lf1-f52.google.com ([209.85.167.52]:48257) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjGny-0006ru-Fp for 69706@debbugs.gnu.org; Sun, 10 Mar 2024 06:53:23 -0400 Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-5131a9b3d5bso2906323e87.0 for <69706@debbugs.gnu.org>; Sun, 10 Mar 2024 03:52:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710067903; x=1710672703; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=/F5mdhMKf5T4+8Uzq/PCLVyUyy8UBYiScdIuklAg9XQ=; b=VbLHq2+3gnx449Uja3zDQGWNC6EzXs0w86Sx9fagTsZcZxCOemgh4aI4g/sr4HAYtZ tkjzIIw/sLHS0Zv5pzA/WHPWXqKU3+YFiIHQbhRaNGcPB6iCfcbBJCJT9VQ0woqNg/Ng tIHgSpqsL5vtAqgkLZ8MEZYDaKI1lL++QSNIlTwyQWkXkPt+je0eOplzfKy5HDJXBRMi 4WL/5SwBzjT7V7rRqdXVUE5ocY+4i4qLIU85GlMSnE2PU8E6RL5syimWMG4V+i7+akqB dUQIp+qqjmpmQ8Py6ueHWMy6HkMJ988GFSvqerCd14GpJ8jK99aobX8jOoMIDqaTVBL/ cMUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710067903; x=1710672703; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=/F5mdhMKf5T4+8Uzq/PCLVyUyy8UBYiScdIuklAg9XQ=; b=ne5aTDsFVVrkQrKES/rsUzfzFp3SpAV1r80D2XaO+QO38nJHCHIP2KN6hIcwhB9met 84KKkKbCBEX11nf0gOqEzxgCgZI2GL+Seo7ER1Yl6BQsxuRkVy5RNjPD7q3iEBzr8AqL t6W57EmIi9lU2hc5q1AKLZndge0ZHoYO+IVd/IG1dq5G40e1S7WY4hq+5sz45cRGho+y hGOLNV9ty2mPl5m2sTADcpfpAo/LdTWhRHDgzAf/gRrQQ+nsTrb6/nhEyudod6UeUe4e EKfdnlq8CqegUoCtLZbBwFCvaOXDPOxz83OqNKJ3JOZD+jbwL8YVLaC54r65iZiTvm4o Y9LA== X-Forwarded-Encrypted: i=1; AJvYcCWpg0vReu+BN/9snrLFdpNXl8HWjRmYe7ymI3YkWJhIBGDEMPab5fLaZKH6m8/Apl+LZ/LEdGh3OrQu+HtOVjBrNs5YGZo= X-Gm-Message-State: AOJu0YzXOFgivf9sMO2kTvN0ZPMXvOvABgr9OxU/KEJJbzrZKOg2vMMO prkZLECieosKyw7rDp8YAlCD6Pf7xyhubSKwze/Zp0jXVqLFON2RXSS8CReN X-Google-Smtp-Source: AGHT+IGwhfW4QTG6mWl61vuLYVZTNRC/QSOnUwRa+KWdPz4D0LLyu5oRUWk7NOCCOMxvAcYt0odL+g== X-Received: by 2002:a05:6512:4005:b0:513:444c:8a7e with SMTP id br5-20020a056512400500b00513444c8a7emr3438656lfb.56.1710067902539; Sun, 10 Mar 2024 03:51:42 -0700 (PDT) Received: from Pro.fritz.box (p4fe3aa30.dip0.t-ipconnect.de. [79.227.170.48]) by smtp.gmail.com with ESMTPSA id o13-20020a17090611cd00b00a45ff1fe8dasm1725688eja.115.2024.03.10.03.51.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Mar 2024 03:51:42 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Eli Zaretskii Subject: Re: bug#69706: 30.0.50; sort.c, unnecessary GC marking In-Reply-To: <86a5n6wew6.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 10 Mar 2024 12:38:17 +0200") References: <86a5n6wew6.fsf@gnu.org> Date: Sun, 10 Mar 2024 11:51:41 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 69706 Cc: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= , Stefan Monnier , 69706@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > Can you show the patch, please? I haven't made one yet. Should I? From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 10 07:12:55 2024 Received: (at 69706) by debbugs.gnu.org; 10 Mar 2024 11:12:55 +0000 Received: from localhost ([127.0.0.1]:35716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjH6t-0007Rc-H1 for submit@debbugs.gnu.org; Sun, 10 Mar 2024 07:12:55 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47960) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjH6q-0007RH-JX for 69706@debbugs.gnu.org; Sun, 10 Mar 2024 07:12:53 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rjH6D-0006Rj-3g; Sun, 10 Mar 2024 07:12:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=jItmEajynY0toLvkaEP529KZs0tTbYNVVTN4rz1gIOk=; b=hhQ7P8+jXiTl/bDH6MjK zZHeeO6uz9zhU4SrJK7xU5F8hHhUNOfvZfhYKixLwS5zdxr8/D8YY2L3LmGOJ5B2ifePa9CHNpuMC 8rqWz2RVO50mU+fy/vzJQMY49DeRCf4ylkB3cq+b9kYB8XhxRZoi6RjxE0/KLZlyx59XqqqQ2VbAW 3ijoTXQfENVbSCOX0uHxD1/fnJ0cR7dZXRPWUKZ7bjKeOUEjP37R7YcRzbMWkJXgaH/NtHE8LJNr6 szxO4hDp83ygu5463m3GBZNx0CGwp9fd8drw2b9vG5XGN3zN2XdhPIJqPmCTcnTsuPuQZlPF41AV/ W1FZ8qYZCyL2BA==; Date: Sun, 10 Mar 2024 13:12:05 +0200 Message-Id: <8634sywdbu.fsf@gnu.org> From: Eli Zaretskii To: Gerd =?utf-8?Q?M=C3=B6llmann?= In-Reply-To: (message from Gerd =?utf-8?Q?M?= =?utf-8?Q?=C3=B6llmann?= on Sun, 10 Mar 2024 11:51:41 +0100) Subject: Re: bug#69706: 30.0.50; sort.c, unnecessary GC marking References: <86a5n6wew6.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 69706 Cc: mattiase@acm.org, monnier@iro.umontreal.ca, 69706@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Gerd Möllmann > Cc: Mattias Engdegård , Stefan Monnier > , 69706@debbugs.gnu.org > Date: Sun, 10 Mar 2024 11:51:41 +0100 > > Eli Zaretskii writes: > > > Can you show the patch, please? > > I haven't made one yet. Should I? I think so, yes. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 10 07:18:25 2024 Received: (at 69706) by debbugs.gnu.org; 10 Mar 2024 11:18:25 +0000 Received: from localhost ([127.0.0.1]:35724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjHCC-0007d9-O7 for submit@debbugs.gnu.org; Sun, 10 Mar 2024 07:18:25 -0400 Received: from mail-lj1-f179.google.com ([209.85.208.179]:42146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjHCA-0007cs-L0 for 69706@debbugs.gnu.org; Sun, 10 Mar 2024 07:18:23 -0400 Received: by mail-lj1-f179.google.com with SMTP id 38308e7fff4ca-2d2991e8c12so33982221fa.0 for <69706@debbugs.gnu.org>; Sun, 10 Mar 2024 04:17:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710069403; x=1710674203; 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=TIx1Y4M7p9efKwJd6iWB2f/jN1Ni03HAmWuKzXdGYzA=; b=PblueObE7yzGdQfMvXPDZFdqxHxPL2cpV85MbPy2c/LpFR5tm5fvZj/17W/1SSyPtt wdkLR62nL7KaZCuAKssuUVFVw7b9IrbCov68TNzQlmribgKAodLokzTCrTh8CcYi1O4I C6RGclf401cdWsdgThsji+vkk1ridSyA8t53tHwsz7QKMHNvPw9LltsyavpT81R4DT0D 9B1Zfympiy+388BMVoea/Mc1QKkRlpS0G+AJBokLUMzFMixM2AVMzRxXzijye4N7AWs+ 7v5tOhVNdJamhN7JS/A7KAJsGfp4VKBTVWVwBGu12kdG190L+w2rWqLdziUdeNgEhI/Y Y9JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710069403; x=1710674203; 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=TIx1Y4M7p9efKwJd6iWB2f/jN1Ni03HAmWuKzXdGYzA=; b=EPImy744ENioL4nvcSsoj9DT82J8IIkDMNw7QKVU30ggFYYIz0URZh+aE0y8oxgVe2 m3l/GIMjWX4f2mwdPiyQmdCYnuUYCkCGtk2vF8YzbMx85Yj1UHIEMu61n8JablFNr5hl XB9yqVGK58ypOfNxZt2JTHkl6IMAqTuez7hg7/wVT4Dr+QuOaMYtag+tAGUUpbQqZhy/ IcFfTl2pOlTDqNoUfJNaRJNOc8b/ITOx4RftdPpk8ghjP1WhnGuYttWkf2eh/hPT1Wb1 /oLpZHyq+9BK3W1e7ar9sBeHqDD+GtJNz7KISrZDlpqmVQvnp21kEJ5TXI5n8uENmhKa K08w== X-Forwarded-Encrypted: i=1; AJvYcCUdcg/bGY1LWCZumV1eRpcvIsRlTTZ166w8wLVk5IukbKF2sEKrmAzUBQ5S6UY4svmqxW6bNi9wjVczj3WIkzeLyK3rsc0= X-Gm-Message-State: AOJu0YyTG//Q/PowT8lf9ei+kmtmyEZsopnmHv9+PsBhJFTFFnc1ZlDc 7Occ2WP/2y/tfrqSfJUV2k7h7MubkPOA68luYLAKWla3Dy8bTXJ+ X-Google-Smtp-Source: AGHT+IHcnzKGdrOvUuXoHPJS86itXcIINEeeH1w49GJk+xKbLBnT7244Bpt9sAcE1cJVdxtGIRm92g== X-Received: by 2002:a2e:b707:0:b0:2d2:e970:f992 with SMTP id j7-20020a2eb707000000b002d2e970f992mr1096500ljo.21.1710069403384; Sun, 10 Mar 2024 04:16:43 -0700 (PDT) Received: from smtpclient.apple (c80-217-1-132.bredband.tele2.se. [80.217.1.132]) by smtp.gmail.com with ESMTPSA id bd4-20020a05651c168400b002d2a8906bdbsm620121ljb.106.2024.03.10.04.16.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Mar 2024 04:16:43 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#69706: 30.0.50; sort.c, unnecessary GC marking From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <86a5n6wew6.fsf@gnu.org> Date: Sun, 10 Mar 2024 12:16:42 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <86a5n6wew6.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 69706 Cc: =?utf-8?Q?Gerd_M=C3=B6llmann?= , Stefan Monnier , 69706@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> sort.c uses record_unwind_protect_mark to let GC mark some objects in >> its merge_state structure, while GC marks the specpdl stack. >>=20 >> This is >>=20 >> - unnecessary because all the objects that are currrently extra >> protected by merge_markmem, are already seen by the GC, because = these >> are the objects being sorted, which are protected in the usual way >> (marking the control stack, ...) Thank you Gerd, but I don't think we can guarantee that those objects = are present anywhere else -- the original vector is being mutated by the = algorithm, after all. In addition, I have Grand Plans (well, some kind of plans) for an = improvement to the sorting code that will likely require = record_unwind_protect_mark or an equivalent facility. A new bug will be = opened about that. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 10 07:30:55 2024 Received: (at 69706) by debbugs.gnu.org; 10 Mar 2024 11:30:55 +0000 Received: from localhost ([127.0.0.1]:35738 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjHOI-00020t-Lc for submit@debbugs.gnu.org; Sun, 10 Mar 2024 07:30:55 -0400 Received: from mail-lj1-f178.google.com ([209.85.208.178]:55580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjHOG-0001lM-JI for 69706@debbugs.gnu.org; Sun, 10 Mar 2024 07:30:53 -0400 Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-2d4141c4438so49236171fa.3 for <69706@debbugs.gnu.org>; Sun, 10 Mar 2024 04:30:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710070153; x=1710674953; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mMexbOAsTfnsofVUcDCgipGcVZ0nKisNR6jhJPPVj7Y=; b=mAoCKA8oURxIsqnM/TARiru13ZhOr8H0CidIRVIvnc/h5l2au/hUYyeH7fSVuYNYR3 ZpS1IQ7sV2prc41AGbe80dnGLQmDSCovP5AUutLS+2NRpZM8RF0p5oqUDub0aCxKvEHx lDe1pBCgReSg7heUeJtN3dBUbBUDlagDubIUxi4jJKwvgquOa1InEXLHnElJxN4Zh731 KkxHCD6/ui9ajS18twOfo3nt2wncIc0kUQrW+bUhI386gqSWzDM9Ktkr+yirSNPF0vZl 9ZNkSM6Hr/uLp0kMKpFUiMS7J5rkxS1cioyUX747wy5iaN6poFUiBQ12VY8arzUOveD5 M2qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710070153; x=1710674953; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=mMexbOAsTfnsofVUcDCgipGcVZ0nKisNR6jhJPPVj7Y=; b=aJ94DH/UBxRZVc7cp6UUnidRGUClVA3vV1DnBOvRxz7MTvlQuea73t4/6dByCBAH00 /soqtF+pkYKa0Mr7W1w7rLEvvG41TYf0tEVdmvAtOinc5oaxpAcO1HtdF5vC45Lq+KU1 ctFRGMq6wfJfuSEFKBGl9VaXpg4cUSqbEQpr7koPYtuMLdzeaZ+9h3zUZIOWemlSNz2R geaS1O2m/1gB1nGQJLmsaZIvvJG96hicc7nc6oSxPBZadf+N7b59tv4txnCelDhnr+Su 3IA+dx36HEns133G4VwHwZr5ZL3qyBspgY+K2WFiPf41MjH0/venzCar9x9A/GPxoI4a rkRw== X-Forwarded-Encrypted: i=1; AJvYcCU8xL8VvprMSr14RArhrmEII0S468GBmGIaUkngmfxwTRAPKsjddVk85xujajtmy/S8r6rjJe7f27G3LLMP2VaHIUr7hHE= X-Gm-Message-State: AOJu0Yy4QibSWI9tnKWgg5k9/ppNl1bx2T3b2cTlPp77dU746T/UOm7w MYYX7DZLv19GIz3gkRyoCgk3JIGtNVDelJNdiXXkD5rd7WAYFqrXfIOKRNjtnAk= X-Google-Smtp-Source: AGHT+IF6Yqu2wcNwuaf5Xlp97eH9uJYasW3EJ1Geaa9wQ5CEjTdBo0K5whad1V1TtOBt2FVh2nOUhw== X-Received: by 2002:a2e:99c5:0:b0:2d2:7fa9:cbd6 with SMTP id l5-20020a2e99c5000000b002d27fa9cbd6mr2200294ljj.49.1710070152939; Sun, 10 Mar 2024 04:29:12 -0700 (PDT) Received: from Pro.fritz.box (p4fe3aa30.dip0.t-ipconnect.de. [79.227.170.48]) by smtp.gmail.com with ESMTPSA id a1-20020a509e81000000b00567216c1e9bsm1934243edf.88.2024.03.10.04.29.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Mar 2024 04:29:12 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#69706: 30.0.50; sort.c, unnecessary GC marking In-Reply-To: ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Sun, 10 Mar 2024 12:16:42 +0100") References: <86a5n6wew6.fsf@gnu.org> Date: Sun, 10 Mar 2024 12:29:11 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 69706 Cc: Eli Zaretskii , Stefan Monnier , 69706@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: >>> sort.c uses record_unwind_protect_mark to let GC mark some objects in >>> its merge_state structure, while GC marks the specpdl stack. >>>=20 >>> This is >>>=20 >>> - unnecessary because all the objects that are currrently extra >>> protected by merge_markmem, are already seen by the GC, because these >>> are the objects being sorted, which are protected in the usual way >>> (marking the control stack, ...) > > Thank you Gerd, but I don't think we can guarantee that those objects > are present anywhere else -- the original vector is being mutated by > the algorithm, after all. 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. OTOH, I think it would not be too hard to make such objects reachanble from control stack... > In addition, I have Grand Plans (well, some kind of plans) for an > improvement to the sorting code that will likely require > record_unwind_protect_mark or an equivalent facility. A new bug will > be opened about that. Please make it easy for a concurrent, mostly-copying GC, use the stack ;-). From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 10 09:40:21 2024 Received: (at 69706) by debbugs.gnu.org; 10 Mar 2024 13:40:21 +0000 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 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 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) 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) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#69706: 30.0.50; sort.c, unnecessary GC marking From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Sun, 10 Mar 2024 14:38:38 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <89F77444-2271-4A4D-8F3D-CB012E87AC7F@gmail.com> References: <86a5n6wew6.fsf@gnu.org> To: =?utf-8?Q?Gerd_M=C3=B6llmann?= X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 69706 Cc: Eli Zaretskii , Stefan Monnier , 69706@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 10 10:03:43 2024 Received: (at 69706) by debbugs.gnu.org; 10 Mar 2024 14:03:43 +0000 Received: from localhost ([127.0.0.1]:37655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjJmB-0007q9-2s for submit@debbugs.gnu.org; Sun, 10 Mar 2024 10:03:43 -0400 Received: from mail-ed1-f42.google.com ([209.85.208.42]:43473) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjJm8-0007pu-80 for 69706@debbugs.gnu.org; Sun, 10 Mar 2024 10:03:40 -0400 Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-565c6cf4819so8009274a12.1 for <69706@debbugs.gnu.org>; Sun, 10 Mar 2024 07:03:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710079321; x=1710684121; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4kTTuDh2I4LswH4lDjMSuFPyPw8PDnjLpae45zT+JtQ=; b=ZfXA9Crn7VYQqxKvPznwLF55GbGd+M2YBreA8/5GcbbQrAZJyXXfioJ6zsyE9Gdl/N g/HegVVEQzWJ6mfBFv1lq5ZmJgjgr+4APaCUad6mmAripDBPQWQrOVG5mV9zeSwCdMeF pV/ZP+sTX/2wbLKiOxIr8Ol1zzLa8lETe2halpFfLfVH/3bc9XOOS11IhTzQZrnD2/EW YYyHnZKldkZqyuRTkveNbk0ZF1+fqTJlikUPPv5J7+czKWLD52rq0GVgPj0uTg0MVEn+ ZIhrdmT7kpF2TZYFq7/ZMTh8j0Rl93ZBu70LiWuW2uFZ4wI6hydV5f38Zlx7IcHz8Q+Y HoTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710079321; x=1710684121; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=4kTTuDh2I4LswH4lDjMSuFPyPw8PDnjLpae45zT+JtQ=; b=O7OCgKdqj7PTc3rjZwSgf3v96rUlAoH3/u20ob0/i+c05fHoAVJSpCw1Xu9jnRNpkc q4hJzPIJPtb0BgkDhNOZ3O5VQt03x4JE4Zmhm7F6eZFJrXHASNagN8b7nMHwqNXCqw1H SsmdoIyTVTBgpiFvXHbHgxXmN1jM/sok3t14DhJ+uTlGlv0SFeaFnLBVg9XfN1Kv701G S6v9LGeChglhMeNXUSyeMWrzfimQLV1433uR75P5TfOW1qQGraiOmwFGQDNk0sQcmu0t pjgYfMgkFSf+EfDVyqT9EKvhcEVdxiTN+vG2qVgshcT8kVn75CbeT6jfK96Fht155DWY j0Aw== X-Forwarded-Encrypted: i=1; AJvYcCUgvBuzwrziFQx6VLBEU01cPjy0A1k8ijgc/PpfkkzGiWuKP0q+zVeTYJyOpSe/MBLsSmh2/QKpiWz05wKiutvDmwIy1N8= X-Gm-Message-State: AOJu0YzwW+pscKA3RX8uFttQbwapMER3NILzgNZ5P3+MYCTiuOPMLO2H PMCcF1RN840LFUTuCd5MVu8E+UuaB6KgbKtg0WqJREGYUVa6snwpg9ssidVd9Uw= X-Google-Smtp-Source: AGHT+IH3ML/D1jLazYq1vNYPaTeIRCtmtldcKXuogEDt6ztmzRMHCDl95ghBwcVQ4Uh165jNkP1pgQ== X-Received: by 2002:a17:906:cf85:b0:a46:1e21:3739 with SMTP id um5-20020a170906cf8500b00a461e213739mr1279414ejb.6.1710079320640; Sun, 10 Mar 2024 07:02:00 -0700 (PDT) Received: from Pro.fritz.box (p4fe3aa30.dip0.t-ipconnect.de. [79.227.170.48]) by smtp.gmail.com with ESMTPSA id m22-20020a1709066d1600b00a451d07711csm1928754ejr.82.2024.03.10.07.01.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Mar 2024 07:02:00 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#69706: 30.0.50; sort.c, unnecessary GC marking In-Reply-To: <89F77444-2271-4A4D-8F3D-CB012E87AC7F@gmail.com> ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Sun, 10 Mar 2024 14:38:38 +0100") References: <86a5n6wew6.fsf@gnu.org> <89F77444-2271-4A4D-8F3D-CB012E87AC7F@gmail.com> Date: Sun, 10 Mar 2024 15:01:59 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 69706 Cc: Eli Zaretskii , Stefan Monnier , 69706@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > 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: Ok, too bad :-( > >> /* 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. That goes without saying. I was more thinking about having a Lisp_Vector on the stack, maybe in the state, which is already on the stack. > 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. Thanks, if I find the time, I'll take a look. So, I guess I should close this. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 10 10:04:12 2024 Received: (at control) by debbugs.gnu.org; 10 Mar 2024 14:04:12 +0000 Received: from localhost ([127.0.0.1]:37659 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjJme-0007rE-Dx for submit@debbugs.gnu.org; Sun, 10 Mar 2024 10:04:12 -0400 Received: from mail-lj1-f169.google.com ([209.85.208.169]:59596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjJmc-0007r0-Ga for control@debbugs.gnu.org; Sun, 10 Mar 2024 10:04:11 -0400 Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-2d26227d508so51701551fa.2 for ; Sun, 10 Mar 2024 07:03:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710079351; x=1710684151; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:subject:from:to:message-id :date:from:to:cc:subject:date:message-id:reply-to; bh=+kml2+LjPE6UP/WRe8v7DeJlQTkgaYJG16CB7cQXLRs=; b=dEG6Y5CregXPS8RVPS2q0/vED8ptbjEx77XU2btBL6D1KC7lRLXHAmq9IqF1UenfFI 9suDSPnJ13M+MIZsAp3tHYKJGO2106D1J2zTLkUQCnmuQXcloS8V9MurWo/To9iExKKX /8AzV3L8CblxWDymYQw8FBGS7Iu8ocfZsuudNZ5C9KePKwJ91OBLvDvOhb6CjTHz77mX D1ReOv7l0OnNNCBHQQbr2QVGa6+z/0xbL0HzvY5PoLrzvHTd50OTgfIreznwOq1mkjqH 8de03oY4WLRsPTA0z9GuIKSNdeqy9f9mbtv7riz8Nh8f+jGP114b8kuv5WLhRc1Z6L5u ieYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710079351; x=1710684151; h=content-transfer-encoding:mime-version:subject:from:to:message-id :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+kml2+LjPE6UP/WRe8v7DeJlQTkgaYJG16CB7cQXLRs=; b=JfdHZ2vdKwttIZD6zl8OxAvdNALwzuOC1I5XVyrm8+H9fpFJHxFadqKLjxN+ykzTmz wS0UcCYgSV4A0N7t3xwWplpYQ7BNcwMpKQob+IpIzYLYk+ns47PRO9+71cmzbztmeCaH 2trTv2CwXfuTIVqvDymQATsnGchUQ53Tx7aX3hCQfd/INloZ7vslCW8QCCkfz7u0L6vf GKGUJZW7Fh4/akxvNhu6xQ9Ws8LgWgTPDd8hwRHIkTrS3jtzgDhuKtlpJaCiYA/Gxxqs KUhUk4veEzxrpo25CJkEvDovsZUc7C25RwvxPb/HIFq6sVZ170n37w/NbmVy1IwmBUQv /R1g== X-Gm-Message-State: AOJu0YyvVkMu3F3guqAyn+M8ziHWIoXWA29ao3wj+QqjQ+lL31+xuMaE v+JFF9ePj33w3uDPWCME0+RGwMVKnibsyEm/tQA008ZDEaN0kGkDNA242sWi X-Google-Smtp-Source: AGHT+IHa+pAiddlIvS1M0FR7q3JJm6zmpIevd0HkHxoHi/2RGqGUZ0V66LQbfF949LvC8ADG544N4w== X-Received: by 2002:a2e:94c2:0:b0:2d3:f464:2274 with SMTP id r2-20020a2e94c2000000b002d3f4642274mr2487060ljh.37.1710079351185; Sun, 10 Mar 2024 07:02:31 -0700 (PDT) Received: from Pro.fritz.box (p4fe3aa30.dip0.t-ipconnect.de. [79.227.170.48]) by smtp.gmail.com with ESMTPSA id fd17-20020a056402389100b005684173e413sm1453215edb.72.2024.03.10.07.02.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Mar 2024 07:02:30 -0700 (PDT) Date: Sun, 10 Mar 2024 15:02:30 +0100 Message-Id: To: control@debbugs.gnu.org From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Subject: control message for bug #69706 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 69706 30.1 quit From unknown Fri Jun 20 07:18:47 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 08 Apr 2024 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator