From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) by sourceware.org (Postfix) with ESMTPS id 569393AAA089 for ; Thu, 4 Feb 2021 07:58:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 569393AAA089 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-io1-xd33.google.com with SMTP id n201so2208901iod.12 for ; Wed, 03 Feb 2021 23:58:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mariadb.org; s=google; h=mime-version:from:date:message-id:subject:to; bh=5PApKz5bZS+GD0yYZ78PcjiN5FwiP/DIfqn9FpW5a8M=; b=OMQqn7xcHd6wPHNl5f6kPEV3UgRRJfyj9gaD510EOiK8TbFr87uh5/U32zpk8g1JHs ZoPmIKWRzHOs9NyEWwp0urLSK3yL64U1LQrBcTG6k8kARHK/Yzj3yOm4cRIR96fuTMNu PncTuB7F35neI+DJuVbxVfDlmKvM8P8bqFPHNYnNpGCsKTQDo8Kw7OrxCUkkNRdXJy/Z bU/DH7eYz9kD0fXuYNuwubBOu+Mwwk16EyEjgl0zrlSVB3hh+WV0+rRnkvefmgJF2JON jUSXEm7c7sKEnnZqP0mPP0kdq8V2Kbk4g8zX6AQEC0GJv4eRkVLvk3qNq0yTTBZe4rPK +TUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=5PApKz5bZS+GD0yYZ78PcjiN5FwiP/DIfqn9FpW5a8M=; b=Focz1xXpS94HPcf3iCsIPZqn7G7q1AfuUHeBlNR80WgSlTfKswNEeBJjJu1IHp1kCM silyzyRLjvVWEmEcGlZpDk37MUA7UiP75rG+B/khCzGjbj5dLd2M7DAcFBi8doSWIgv4 psSXgArGc9QWhSKn7JfYtIitYUmIg898NLLJ9FQaq+p3HtZOuxBFZaKGYw5JKXh2kGka gztBhqLzreiB2MJY09nCVfjL7L4xiapnuitvUcf6AZp2L53kSLxYYoBnm+mG6KXf6f1i gQsOjmf3Z/H+WBPTlAewV5r780BCrXZzoMtetLo/+ca5NN7GyVLlm+T9XLEm8VZBM1zD yzjg== X-Gm-Message-State: AOAM532AlQMeZtkxvhu9r720NBSkLX5aBoP/wJksaHjzGbyP4ef/6xWG PlBL974g1WP+dvwKJ1E17A34ayg+HryP+HOrvh1RMYQ8Df0BYw== X-Google-Smtp-Source: ABdhPJxvpn1T6zUjdrjvDBozS3wWuEfpmrHnZqkpgyoC6qzq8d4dAw1gzxXxw+xW/StXKgcC1LUywZRcDsTmIGCnHPQ= X-Received: by 2002:a6b:f211:: with SMTP id q17mr692838ioh.198.1612425525580; Wed, 03 Feb 2021 23:58:45 -0800 (PST) MIME-Version: 1.0 From: Daniel Black Date: Thu, 4 Feb 2021 18:58:34 +1100 Message-ID: Subject: ld.so - text and .data application segments to huge pages To: libc-alpha@sourceware.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.5 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, 04 Feb 2021 07:58:48 -0000 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? Cheers, Daniel MariaDB Foundation