From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.devel Subject: Should use of mallopt depend on DOUG_LEA_MALLOC? (WAS: bug#38345) Date: Fri, 13 Dec 2019 07:12:09 -0500 Message-ID: <87immkctly.fsf_-_@gmail.com> References: <87sgme1ww7.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> <83o8x0rl6d.fsf@gnu.org> <87lfs2mzo8.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> <87lfs19shb.fsf@mail.linkov.net> <87a78gn5k5.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> <83sgm8ox3g.fsf@gnu.org> <87zhgflxmc.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> <83lfrzq1s1.fsf@gnu.org> <87d0d7w3tt.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> <83zhgaloc5.fsf@gnu.org> <87zhg7jmjg.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> <83h82ej03y.fsf@gnu.org> <87r21ick48.fsf@gmail.com> <83immthovt.fsf@gnu.org> <87o8wkc50t.fsf@gmail.com> <83lfrodix4.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="172149"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 13 13:17:52 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ifjtH-000idX-Sv for ged-emacs-devel@m.gmane.org; Fri, 13 Dec 2019 13:17:52 +0100 Original-Received: from localhost ([::1]:48306 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifjtG-0002nd-8a for ged-emacs-devel@m.gmane.org; Fri, 13 Dec 2019 07:17:50 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33494) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifjno-00052q-SV for emacs-devel@gnu.org; Fri, 13 Dec 2019 07:12:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ifjnn-0007FU-Ld for emacs-devel@gnu.org; Fri, 13 Dec 2019 07:12:12 -0500 Original-Received: from mail-qk1-x72d.google.com ([2607:f8b0:4864:20::72d]:41603) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ifjnn-0007Eb-EY for emacs-devel@gnu.org; Fri, 13 Dec 2019 07:12:11 -0500 Original-Received: by mail-qk1-x72d.google.com with SMTP id l124so1485760qkf.8 for ; Fri, 13 Dec 2019 04:12:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=L0kqzgBVyefH58a0MZhUUTUBd5qRXNPLbXSBLRq4gXk=; b=llJHHlOg0uuVmTHLOC/T3BtdYIVs0upxvtUI3Qwa7D1dm2cHNJm2MLQy42ZJ8uzxrj 4A2NoFPC6GB+yItsqG3326zMJ8Wt4XZULb78dMj4n34nxxjoEcVfdusLu3z6utify87h tEqeJ2w771w8L3FURhp73T9nhyM948+Kv2GvonVYLtA3McqrJEuFCnZd5taFrz3kQAu3 BlBIPTSsX5W7u4L1l6bLlIeKtmF9MqTysZwWFhpmCYJiSiJ5OU5C4dRWWcxZ0AEksRRp jA4SaMbCK5TOP4UkpjoeOEEE/OIlcTpGse1Q7wzuZBTtkzkeYSaK/k6SagaihSKqRFjS ti4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=L0kqzgBVyefH58a0MZhUUTUBd5qRXNPLbXSBLRq4gXk=; b=txGjr78HAeEp3XIdZMJusuoNaJmw4jnO25MOdcXPqjl4kMwqPyJ9Xs3mjhZ/o4Pdw4 fUJbrAqiaBNRCZBo9WXXWc+AWb2/1NboRhKlhp+v2hIH4TrSWce55l2xLsb2amSEVzG6 Mu95F96+jvU+ZvLMYlL4QxtFprXYk4BCfUjBVz91DHGkYlUem+56fv2CVLauCFW6+Kxz IoXVjbFapslO4eD8KrSyb09ONhhTB2ai0rSdtQF5icBGcYaI+MQteEOIFbtSTX8uWZPE tkopqIxqkoENVVIfPXEESbBZ/7YASfkaNxZkfxjYRiFWOGzcXs1TPfUy28YjXfzapTFz CZpg== X-Gm-Message-State: APjAAAXnwMgSP65v0woK/VCCySu1Zm0LxPY92FXV2kL9DrJ4oobnXXE/ cpXRdLbVj0TxmZaSEmMnGcSajHYM X-Google-Smtp-Source: APXvYqyzHIIYwX7XfWfTQFs69vf4lVD5LWsPDKYJJfRAKK+FcjZH710HW2tAxCiqtX+gUqW7yrCqfw== X-Received: by 2002:a37:4e4e:: with SMTP id c75mr12777635qkb.3.1576239130539; Fri, 13 Dec 2019 04:12:10 -0800 (PST) Original-Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.gmail.com with ESMTPSA id l33sm3445255qtf.79.2019.12.13.04.12.09 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Dec 2019 04:12:10 -0800 (PST) In-Reply-To: <83lfrodix4.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 07 Dec 2019 21:39:35 +0200") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::72d 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:243349 Archived-At: [Moving to emacs-devel, since this doesn't seem to be about the bug as such.] Eli Zaretskii writes: >> From: Noam Postavsky >> Cc: yantar92@gmail.com, 38345@debbugs.gnu.org, juri@linkov.net >> Date: Sat, 07 Dec 2019 14:25:06 -0500 >> >> > So does this mean modern glibc has no knobs to tailor its behavior to >> > various needs, like set the threshold for using mmap, etc.? IOW, no >> > more support for the likes of mallopt? >> >> Looks like mallopt is still there, but Emacs' DOUG_LEA_MALLOC code >> depends on malloc_set_state and malloc_get_state which were removed in >> glibc 2.25 (2017). >> https://sourceware.org/ml/libc-alpha/2017-02/msg00079.html > > Thanks. Then I don't understand why our calls to mallopt are > conditioned on DOUG_LEA_MALLOC. What they are supposed to do should > be good for modern glibc versions as well. It could be just accidental, since DOUG_LEA_MALLOC (i.e., malloc_get_state & malloc_set_state) used to always come with mallopt. Although it looks like most of the mallopt calls are only done if mmap_lisp_allowed_p returns false. mmap_lisp_allowed_p is only defined for DOUG_LEA_MALLOC, so I'm not sure what that condition should evaluate to if DOUG_LEA_MALLOC is not defined. I also don't really have any idea what the mallopt calls do (that is, I can see in the documentation that they modify such and such parameter of the allocator, but I don't know what that means in practice: faster, slower, less RAM, more RAM, etc). So I hope some more clueful people will chime in.