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: Opportunistic GC Date: Thu, 11 Mar 2021 10:11:41 +0000 Message-ID: References: <83tuplr2l8.fsf@gnu.org> <838s6uohv2.fsf@gnu.org> <83y2eum6g8.fsf@gnu.org> <83tupim3tt.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25228"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, Stefan Monnier , Andrea Corallo To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 11 11:14:29 2021 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 1lKIKq-0006Tj-QM for ged-emacs-devel@m.gmane-mx.org; Thu, 11 Mar 2021 11:14:28 +0100 Original-Received: from localhost ([::1]:39494 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKIKp-0007Bt-TL for ged-emacs-devel@m.gmane-mx.org; Thu, 11 Mar 2021 05:14:27 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39452) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKIIo-0004zx-A1 for emacs-devel@gnu.org; Thu, 11 Mar 2021 05:12:22 -0500 Original-Received: from mail-oi1-x234.google.com ([2607:f8b0:4864:20::234]:35142) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lKIIl-0008Ti-3Y; Thu, 11 Mar 2021 05:12:21 -0500 Original-Received: by mail-oi1-x234.google.com with SMTP id u6so15218933oic.2; Thu, 11 Mar 2021 02:12:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BrfHemeUkhzpYlNJP6sJz4rrRJIB+T5tAYswQX1jTtU=; b=OSkLFrB05uzhCSsltHyce84+S+5DThmBe8bPMh0e9eYi9Ms6JTAZj4vTVZAfHIv/WG oYdBdQ4vB+jIVJZyARhcU6l96CWZ4hbi0PwRztoXGpE5OEA/Q5NqxKaS2INbLvhj9q0K Gq+hJqug4WmFPHcXBepEysqcVbl1zn0mFsT0CAaP3PdCjht//vtBH0vQnQvHjlOPAN04 L3hVOni0swTUatLrNifED4yMHPyJ6e+YCdQ32vEJFId344Gas0FQeCMEJ2izMR/iYgPD hUsDHtbZs0FhoSQz3tpgPHuEhqJDUF6+MuRaT5lxnhLjaaSp2tUl9OjI+wZWP7vkiqqr uRgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BrfHemeUkhzpYlNJP6sJz4rrRJIB+T5tAYswQX1jTtU=; b=sE833A9hP3aNhloybNTSbKXZRvhxT4Ef0VFwXgAP0k+cazEJmM5pOqF+T1y4Kq2W0B D5tb9D1lmnx3pf6vUwap8ZHAx9cWzqLjUr+BHwRTCZW99JPmIhvazuhJI6QghWb8luXD RgWsEiWFV6O0rW/kY53VVp3qkma9315Uop8oQCp5ZGLl8v5S4VIEKvedL+6xSMzFxfDM k0i3x/bJ7aceXxnSznzHbB8KHeTLTDvkSMgyBRv8/0GS15/kpRvda3bVMxqx4qTOrrwy rt68heWFcSTF/EoFGT4qohUlP6pj28ES/f57RTUlCvRa7XB5qqDn97lDc6d4Fv6QyvQu bEpw== X-Gm-Message-State: AOAM531iocFuYyZzGBigk1WLt71aYXrNFPNc8oGp/p2CNH8k98vqGc61 BgI1qZkUZcRvjgLt/tZfJGatDxHqWtiOLe0v959IQYI9o+o= X-Google-Smtp-Source: ABdhPJxH5DNh4P0t3q6UikIrsVYUfHS12szKofaiEwZJw5HHKh9wJvynFYez8DWfSk50A43OI/6H+a1RJy//NiwW9nc= X-Received: by 2002:a54:4196:: with SMTP id 22mr5635046oiy.30.1615457537482; Thu, 11 Mar 2021 02:12:17 -0800 (PST) In-Reply-To: <83tupim3tt.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::234; envelope-from=pipcet@gmail.com; helo=mail-oi1-x234.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:266323 Archived-At: On Thu, Mar 11, 2021 at 9:34 AM Eli Zaretskii wrote: > > From: Pip Cet > > Date: Thu, 11 Mar 2021 09:03:23 +0000 > > Cc: Stefan Monnier , Andrea Corallo , emacs-devel@gnu.org > > > > > See thread_select. > > > > I have no intention of calling thread_select. > > If you call wait_reading_process_output, or any of its callers (such > as accept-process-output or sleep-for), Emacs _will_ call > thread_select. Why would I do any of those things in the child process? Note that they'll continue working fine in the parent process, which is unaffected by the fork. > > > We don't call pselect directly. > > > > In this case, we should. I don't see a problem with that, as the child > > Emacs does not need to perform other I/O. > > If you want to do that for any of the above-mentioned calls, you will > have to modify the code of wait_reading_process_output. The child process's sole job is to inspect the heap, perform GC, and return collectable objects to the parent via a pipe. It does not need to call Lisp. It certainly shouldn't call thread_select, or wait_reading_process_output. What am I missing? Pip