From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: MPS: weak hash tables Date: Sat, 06 Jul 2024 14:43:43 +0200 Message-ID: References: <-plQctKgNkvp-LJ9ov2QAiXQKxd9V-hI0yz_opRGxQtbknubCjH4rH2-ymgbw_Qr1ZhB1rtlmiEW8XtuIVNr7nR_Yj20AH6WkH6kUGp68g0=@protonmail.com> <_mNcR6ailVKpYHLxgfo_tJlYGeR0AQIzQWluspYYp5_g5pIIKkHLNfFkklQQgOKNiVW8jn8NS3i2dJ7_B2Qyx9v-Dq3MQ9mP8HNL30UWsqY=@protonmail.com> <878qyf4sgm.fsf@gmail.com> <878qye3l81.fsf@gmail.com> <86a5iu4tiy.fsf@gnu.org> <864j924s9b.fsf@gnu.org> Mime-Version: 1.0 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="15157"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: eller.helmut@gmail.com, pipcet@protonmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jul 06 14:44:20 2024 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 1sQ4m4-0003jH-6e for ged-emacs-devel@m.gmane-mx.org; Sat, 06 Jul 2024 14:44:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sQ4ld-00021R-At; Sat, 06 Jul 2024 08:43:53 -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 1sQ4la-000219-QX for emacs-devel@gnu.org; Sat, 06 Jul 2024 08:43:50 -0400 Original-Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sQ4lX-0001XB-Rj; Sat, 06 Jul 2024 08:43:50 -0400 Original-Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-42565670e20so21211515e9.0; Sat, 06 Jul 2024 05:43:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720269825; x=1720874625; darn=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=eBShC/QNonyGdtWI5+VwJ+OjZk7UEY1Y9jk0GNuFH9Y=; b=kDv73qwSTuupRHBb/1CaHO2XJQ8dV6+1MPn/GMFErev62hD1yAl0lp3fcmIqNpmSxZ e9VBJ3lO4sc/Fwl3p7DbJDFQqDqQDytGYNAbaj171fxein9/unnbQUSPBRWA0OPhXv3z LmKi5sINWV+PD3chjshoPgy3uGDDBEgbMT6a3rg8XF/zrMtagcKNDOF7YyPg63xxxxfF mAq6ww5Czppbp+gLbvaagPAxzvx/2jwsoaOv3iF1cb1TJjXABWrZj4yclc7OMQZgXtKe QArA5Z1UGqkeWSMzg5FQXxz4YwnzfYNg8fxDsEDw53MWrjN75ldbode7lwsIvaro2gX5 8K/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720269825; x=1720874625; 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=eBShC/QNonyGdtWI5+VwJ+OjZk7UEY1Y9jk0GNuFH9Y=; b=qx8BS0iGdnCtFAPyorSHNw14fwD6PR3WFtaWEmy3Ay9m6Xs3BFzyso4iXkK1Wwrks0 RpDJYxvbpuPJM0mOEzu0zEqxnuLFJcnX8HYpuZ/67qezKVjfYHTjeyj2wyGNAZ7XeGfH ltbrewA/v5tJAdcsOxdL2bvBdsMbq29AX3NJZulwcD6Mk5YJR36e69GwYITnRh/bDoAj 5AXDtqWoYyeEhUtC/xwRoE+agc0PRPVQPOu5NYL7NrG50tZFLTeA41nlmdaSTooSwIbx MoX9FPfSvL244n2vqEQnmZdcKVglTR+l8aFZLaJpKYLubSbCfkYYaHpDBhx1puY4h+O3 /EGA== X-Forwarded-Encrypted: i=1; AJvYcCXirXmUbTrt+E4wpXa2YZZcVUiuBuyoAIcOmID/7pj7m4umUIME2511N3w/NH6RLL6qSEhjANgWFOLuk6AXCxPzJ4Tq X-Gm-Message-State: AOJu0YyceexFuzPX2XP+QpO/B2DEzH2symu1Dc+N/P6ol6xMuMR/lyEd Ec3tu93GwMXaMgujL/BwaADAg/TFbuEcnffrr/kOIW88t7vTid4yfuPHHg== X-Google-Smtp-Source: AGHT+IGcfYWgTa/zMqX/SOCK5FfPO4YFvpFcD8puFFnv7zhq8DdOBizqfDCBZ+y/LV09J5C6tZJZ6Q== X-Received: by 2002:adf:f8d0:0:b0:367:8fe2:7d8b with SMTP id ffacd0b85a97d-3679f76fd93mr6823276f8f.31.1720269825002; Sat, 06 Jul 2024 05:43:45 -0700 (PDT) Original-Received: from pro2.fritz.box (p4fe3a82e.dip0.t-ipconnect.de. [79.227.168.46]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4264a1f2391sm97140685e9.25.2024.07.06.05.43.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jul 2024 05:43:44 -0700 (PDT) In-Reply-To: <864j924s9b.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 06 Jul 2024 15:30:40 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=gerd.moellmann@gmail.com; helo=mail-wm1-x335.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:321433 Archived-At: Eli Zaretskii writes: >> From: Gerd M=C3=B6llmann >> Cc: eller.helmut@gmail.com, pipcet@protonmail.com, emacs-devel@gnu.org >> Date: Sat, 06 Jul 2024 14:16:55 +0200 >>=20 >> Eli Zaretskii writes: >>=20 >> >> Which poses the question where can we put that igc_process_messages, = so >> >> that it doesn't get too expensive (if it is), but is regularly enough >> >> called even if not idle. >> >>=20 >> >> Maybe_quit, maybe_gc, specbind? Any other ideas? >> > >> > maybe_gc, I'd say. But the conditions for actually calling GC will >> > have to change, of course. >>=20 >> Or another idea: >>=20 >> We allocate bignums in igc. Every N bignum allocations, take some time to >> process messages and thus finalize them. I have no idea what a good N >> would be thpugh. We could try with 1000 and 0.1s, maybe. >>=20 >> This also assumes that only bignums are allocated frequently plus must >> be finalized. Don't know if that's true. > > maybe_gc is already called from places which tend to allocate Lisp > objects, so I'd go with that. Right, but I have no good idea how often to call the message handling in this case. How often is maybe_gc called, and every how many calls would we then process messages. So, I've done the other thing first. Maybe we get away wtih that, and that code at least has an idea if handling messages might be necessary, or more often than usual.