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: Mon, 8 Mar 2021 15:02:18 +0000 Message-ID: References: <666da624-2f59-2eb4-8e56-f0ad20dd900c@gmx.at> <26ff7447-9c29-a2f2-bf3d-9eac20a95d0f@gmx.at> <838s6xsnsv.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="12633"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rudalics@gmx.at, Stefan Monnier , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 08 16:03:41 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 1lJHQ4-00037W-5k for ged-emacs-devel@m.gmane-mx.org; Mon, 08 Mar 2021 16:03:40 +0100 Original-Received: from localhost ([::1]:34852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJHQ3-0002km-8B for ged-emacs-devel@m.gmane-mx.org; Mon, 08 Mar 2021 10:03:39 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45012) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJHPN-0002Hq-Lf for emacs-devel@gnu.org; Mon, 08 Mar 2021 10:02:57 -0500 Original-Received: from mail-oi1-x231.google.com ([2607:f8b0:4864:20::231]:46710) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lJHPM-0007yr-4p; Mon, 08 Mar 2021 10:02:57 -0500 Original-Received: by mail-oi1-x231.google.com with SMTP id f3so11214820oiw.13; Mon, 08 Mar 2021 07:02:55 -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=MAE8dwNX/AczimPn9bcddJp7A3686Vepbat1jN5mMt8=; b=atcPyBP8TuSmb+YfniD0JrLETSwVoDc36Bl7jbNzw0fVK49JHxoNy7KlW6U+qPfh/P t/pckyynLYwkreIrDomISfkrAWLtjVCqObRmb094shkO7poLFDBNLlt5cYVZfEnhtaWi mZ2yGBL5aB91AQ0ZdI6nmONWLGpABSfl30noOFKsNEdOdL2U4Xj+bvi64wa+rXUcn1Kt H/SZqRCA1Aw0i6N+PEeJNmXhxs6fVcpDqjQkSP3CyVmDWja8dye1j2ooGWAjcMRQ5Vdt 6dS76T7Ks0s/fQy5Mvs0Gcbd34sJ8UI0/anvHiZE2tllsVcIu89tfFMp07gCBkNdM2Pj u23Q== 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=MAE8dwNX/AczimPn9bcddJp7A3686Vepbat1jN5mMt8=; b=ULhT+tgFYGPOjXH51UWEuM/BFqIZiHQkMNqE3ewwhOzjDjo5+yOV6IkvjS1Fzj5o/G p/YbI8kXuda7GmMFPx3L1nuFtkR+xIe9jbMtVNFtpL9TKD6TbuSrO4/3RhNnKsOmdKO0 mHD/hqXw0I6qDY3+lYn10lQgd9liBQcW3uDXSod2mAdFnUTvfptAVZAc7fggW4uEHGcg Rruu7q+2cowkGINwF0eAZKxPCxPIf7AIKabynpf/zMzWuhXKgvrrzVBOkTvRjHyEP9wv o93Xw7BZ5y6e+YIxQByL5CgRzF/8X7iFqclApMekNRhXIs7NIR8S4R5vjzdOOEFisux1 ArLg== X-Gm-Message-State: AOAM532k2nqDRT5cXOUMSrB/dcX3KCS88Btmctft4ktzhHCQqvpZHyun UJ4tQEaonrRDWDij+IqEaraZ8zS1bnWmojDTe8zBl8s6CYE= X-Google-Smtp-Source: ABdhPJwKLmim53myoq1UqqEYLa5ArT3oitL70jXnHB3GqLZVtgG6StlvUsyeTIhPUc51gAWliE1VYCFGZeJRfGXt/js= X-Received: by 2002:a54:4196:: with SMTP id 22mr7006304oiy.30.1615215774831; Mon, 08 Mar 2021 07:02:54 -0800 (PST) In-Reply-To: <838s6xsnsv.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::231; envelope-from=pipcet@gmail.com; helo=mail-oi1-x231.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:266187 Archived-At: On Mon, Mar 8, 2021 at 2:49 PM Eli Zaretskii wrote: > > From: Pip Cet > > Date: Mon, 8 Mar 2021 10:44:06 +0000 > > Cc: eliz@gnu.org, Stefan Monnier , emacs-devel@gnu.org > > > > And, yes, we should keep the mark bits separate from the data so we > > could avoid unsharing an entire page because a single object in it > > survives GC. > > Ah, so not really an easy change after all. For conses, it's easy. Instead of keeping the mark bits in the cons block, we keep a pointer to the mark bits in the cons block, and allocate the mark bits separately and (hopefully) on a different page. > And how do you propose to keep the mark bits separately and still > maintain coherency between the object and its bits? Just as we do for pdumper, which already does this. In fact, I'm pretty sure it was Daniel who said a while ago that he wants to extend that to all GCable objects, not just those that live in the pdmp. AFAIK, we never go from mark bit to object, only from object to mark bit. And that would simply be behind a level of pointer indirection. In each Emacs process, there'd still be a 1-to-1 relation between objects and mark bits. It would just so happen that there are two Emacs processes, one of which only checks which objects are unreachable in it and tells the other one about them. Pip