Message ID | 20231123172915.893408-1-adhemerval.zanella@linaro.org |
---|---|
Headers |
Return-Path: <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9712E385800C for <patchwork@sourceware.org>; Thu, 23 Nov 2023 17:29:35 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by sourceware.org (Postfix) with ESMTPS id 9F2CD3858D1E for <libc-alpha@sourceware.org>; Thu, 23 Nov 2023 17:29:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9F2CD3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9F2CD3858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::42d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700760563; cv=none; b=hd8FhOQevRsAJlIEyiUEAbb/N/vNy+s2P3qmAQTrxMYCzl9lUpPDHgTDUcEvYvvN47lMRdmHLc5hh7PZb1+rTuENjvm6yOJ3EVtp2zVemP/os+zAmBJFsxZrJbhPRRVngx8Fgt7Wx/CQqMUkkADB77ELYi38hRyGsE027OySgnc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700760563; c=relaxed/simple; bh=Vq2Hz5COa87Nouuszty5nBjLhOW4dxz83JHYgK6d6T4=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=DxTme5jpQO7eJD0N8OBX7fw2f77JA1IOT79RrfdkME0O2s0G7D8RW0LIGEIB3FWkGI48sDxi8btfZQMzjWn9Nfcw9raFlXPmxbLP/ZudJgo32+Etzg6ml7zghzIRRTdkF/mWTnDVudm2gZuxh8tFWk21fG9bmvpqROnjlJIwNbY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-6c4eaa5202aso1065358b3a.1 for <libc-alpha@sourceware.org>; Thu, 23 Nov 2023 09:29:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700760560; x=1701365360; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=JPx4BkKbi9qmjVGVwCNvXZeE3Ln+OAs8Pi0tgsV9Blw=; b=Tcy8HDGEXHizhmvw+mzRlXrSvYF/uVzvh2vgwVgjH1Pg/T6zBji+q4T1GJv5Zn/EFe vbUvmGittCzPfIu8bf/8iLKiRPZrKB2ouoBghPeopiP/XhNcpeh4Zxe1WUH4WAB38WvD 1QgYvSuXeGf/AZFAihYiKzIwxEQ5tXumaXgZ7+los+xTHf8Am2Vm4NqNRcOK+/lBROuf Hy/79O2RvMnD5gBDAf3SLHhrHlOn67aOzTCKnrX5WZAHvQKbVdKOfmtGvf/YMIlxS6Vh 3tSf/NPbtKHxukCcW1WntXQlcInTidMxE+GlKaMZZm9VmntlA0QmIXFRwOliFnc5TuHq skZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700760560; x=1701365360; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JPx4BkKbi9qmjVGVwCNvXZeE3Ln+OAs8Pi0tgsV9Blw=; b=N4/WxXaObyj9mcywyiz7xbrGvpPoR0fDy8DzAEt+0I+ddYHH45ycwfb6cs53QnPOmj Sx4oZdJYXynFhEMHg3Htx5lTBVWYaPWewT4KdVOwIl/vspeVyqIdCoAqQYFQHuDM0RwG /FlZOohXyfJpKdE3SDuZ9hcQXLWSEjOoAgwk+8XEfOTsgHQ1yoI+NxEO2nGdNVxvQl2E FkhK94MqdacxfhpfUuP7LEjLwSDCQ0XJudBka2j6AwQXvolWgbvym/Bk4gcl+w8S5Cz0 J/eaim/loPjRQZuS03OPzHQxAgVvaNK2bngCY0uDr06W9nj1rboTotYKvARK/eWjI5gq QYmA== X-Gm-Message-State: AOJu0Yz2JIrW4ZLwUyURcDvdeic70ZP5QvbGUTO/rnGdAgy+grBUlQKI NkysxySM5Lnw0zgJzhNcUeMDr15GopTjzDEFWf6J6A== X-Google-Smtp-Source: AGHT+IFAwtXILMqFfX+W09LZ4aubiuUaonopsT0KaofGekzouVovfwW7aA0kwHlvl2JOPbRNfO3duw== X-Received: by 2002:a05:6a20:258e:b0:18a:e802:f7a1 with SMTP id k14-20020a056a20258e00b0018ae802f7a1mr329514pzd.1.1700760559944; Thu, 23 Nov 2023 09:29:19 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c2:94e:b32d:2af9:e993:fe7c]) by smtp.gmail.com with ESMTPSA id 16-20020aa79150000000b006c2fcb25c15sm1466578pfi.162.2023.11.23.09.29.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 09:29:19 -0800 (PST) From: Adhemerval Zanella <adhemerval.zanella@linaro.org> To: libc-alpha@sourceware.org, DJ Delorie <dj@redhat.com> Cc: Zhangfei Gao <zhangfei.gao@linaro.org> Subject: [PATCH v2 0/2] Improve MAP_HUGETLB with glibc.malloc.hugetlb=2 Date: Thu, 23 Nov 2023 14:29:13 -0300 Message-Id: <20231123172915.893408-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org |
Series |
Improve MAP_HUGETLB with glibc.malloc.hugetlb=2
|
|
Message
Adhemerval Zanella
Nov. 23, 2023, 5:29 p.m. UTC
On some tests with glibc.malloc.hugetlb=2, there are some allocation patterns that are not backed up by large pages (different than libhugetlfs morecore implementation). Adhemerval Zanella (2): elf: Add a way to check if tunable is set (BZ 27069) malloc: Improve MAP_HUGETLB with glibc.malloc.hugetlb=2 elf/Versions | 1 + elf/dl-tunable-types.h | 1 + elf/dl-tunables.c | 40 ++++++++++++++++++++++++++++++++++++++++ elf/dl-tunables.h | 28 ++++++++++++++++++++++++++++ elf/dl-tunables.list | 1 + malloc/arena.c | 13 ++++++++++--- scripts/gen-tunables.awk | 4 ++-- 7 files changed, 83 insertions(+), 5 deletions(-)
Comments
On Fri, 24 Nov 2023 at 01:29, Adhemerval Zanella <adhemerval.zanella@linaro.org> wrote: > > On some tests with glibc.malloc.hugetlb=2, there are some allocation > patterns that are not backed up by large pages (different than > libhugetlfs morecore implementation). > > Adhemerval Zanella (2): > elf: Add a way to check if tunable is set (BZ 27069) > malloc: Improve MAP_HUGETLB with glibc.malloc.hugetlb=2 Thanks, Adhemerval Tested on aarch64, based on glibc master branch. With these two patches, our application using 2M pages does not trigger page faults now, and many page faults before. Tested-by: Zhangfei Gao <zhangfei.gao@linaro.org>