From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x133.google.com (mail-il1-x133.google.com [IPv6:2607:f8b0:4864:20::133]) by sourceware.org (Postfix) with ESMTPS id 5758A385803F for ; Thu, 11 Feb 2021 07:53:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5758A385803F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=mariadb.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=daniel@mariadb.org Received: by mail-il1-x133.google.com with SMTP id m20so4258847ilj.13 for ; Wed, 10 Feb 2021 23:53:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mariadb.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IGDK7AnTmAktq4oFPl6CxH67Pd1zweTtuQmv0Soct40=; b=jWf9Qtpc40LLJHzGeKsymXxFKR56ST1InYioSMc2P/Xe4Tw/wM425eYb3IP66tX5eF Nve7ky6K3osqdNG/sNtVXt8U8yviOiPMg+R9txFmT2djX2t8qUM4PhaXRSqVvbslUUZf M6bIvknil4aCBOEy8N5XWKhYW4NvKkCWxVre/t0OgOj7lplB3rVa39YmA4w+MScOEMuC jZIutcdOJ1526oXbWSbPLMZXT+bcchGABResGEbEzwEqdYRDuRxa09YL1Cy3f4/FyAtL 5xbNompPA0PhfHBs4BQTxnxem2oerbvDZ2y4zqYnR6iAwPL2JM9GO3OzaVOnv1c67eJP wtkw== 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=IGDK7AnTmAktq4oFPl6CxH67Pd1zweTtuQmv0Soct40=; b=A1M9edssxN1D9DV2WpepXImd+sLjMpcDtHcOwvS/mbyeEkzOqdbiMtFoFj1dX0BiuG CUg91lTEn3kvj+Tb8KAW1v4pVmhQtobB3JkFoOCUHpe4RrzNvDP6rgSVtbCCCmIrAvUW XLTp/+9sd7VuPRCDRAW7CrzV8ZluVUkw7RrdYmKgtwpITQhl5Mvcjht4SA7vDEUCAbs4 SFUuO1FFuEJlP3ZDWNQAUhCqecbPCzQYfpGL9/KDp/V9eO8tCtEaOGPctTucAhi6sjQh xXKuJLWM16R6aa2cVg2piVgrkcVECHhpjlejXRX7YvH8gmMrAskyM0ppBvJgSSRE1ovb aYWw== X-Gm-Message-State: AOAM530+UnBBgUREj564Eo2Y4B1SCH4z5vkbDMnjiXo2l83tA1VULLEE s5V0hSxGJeQuKJiz9+77ioxMcbPlQo2M8lPIkrLQQQ== X-Google-Smtp-Source: ABdhPJzNdx6fKBIqtG/Ag+6/jkMfMNlzLsGdsRdJPs1AFnenJPA5jhzClK3XadC7ivdgWV+h7i8gOj9APTGOMI0Pa18= X-Received: by 2002:a92:d351:: with SMTP id a17mr4620369ilh.59.1613030004859; Wed, 10 Feb 2021 23:53:24 -0800 (PST) MIME-Version: 1.0 References: <87o8h0m8j5.fsf@oldenburg.str.redhat.com> In-Reply-To: <87o8h0m8j5.fsf@oldenburg.str.redhat.com> From: Daniel Black Date: Thu, 11 Feb 2021 18:53:13 +1100 Message-ID: Subject: Re: ld.so - text and .data application segments to huge pages To: Florian Weimer Cc: libc-alpha@sourceware.org, aarcange@redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Feb 2021 07:53:27 -0000 On Thu, Feb 4, 2021 at 9:28 PM Florian Weimer wrote: > > * Daniel Black: > > > Hi, > > > > I received this exceptionally large (slightly convoluted) patch to > > MariaDB to move the .text and .data sections to huge pages in the > > MariaDB issue https://jira.mariadb.org/browse/MDEV-24051. > > > > The author Dmitriy Philimonov (Huawei) claimed great gains of "9% in > > TPS speedup. iTLB && dTLB misses reduced in 38 times and 5 times > > respectively. Latency becomes lower, the jitter in the TPS reduced > > significantly", so it's definitely beneficial. > > > > Obviously maintaining such a large loader work around in a userspace > > application is going to be a burden on the skill set of developers we > > have available. > > > > How complex would it be for the glibc elf loader to use huge pages for > > data segments on load? (extending _dl_map_segments with an environment > > variable control like LD_HUGEPAGES I assume). > > > > Is there any required kernel work to implement this feature? > > > > Would such a concept be supported by the developer community here? > > > > If so I'm happy to write up a feature request (https://sourceware.org/bugzilla). > > > > Anyone off hand interested in writing it? > > I think the kernel already supports this via transparent hugepages, if > you increase the segment alignment via those link editor flags (as in > the proposed patch). Thanks Florian, sounds like a good move to me. > Cc:ing Andrea for additional comments. Still welcome if you have time/insights.