Message ID | 1639685166-28543-1-git-send-email-patrick.mcgehearty@oracle.com |
---|---|
State | New |
Headers | show
Return-Path: <libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=OFuluBmt; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=<UNKNOWN>) Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JFNRp3dY6z9t9b for <incoming@patchwork.ozlabs.org>; Fri, 17 Dec 2021 07:06:46 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 93821385842A for <incoming@patchwork.ozlabs.org>; Thu, 16 Dec 2021 20:06:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 93821385842A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1639685203; bh=L0LvaWadmR3/Ivq1IaK9ERE0d5BSmiJ75dEXNEWqagA=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=OFuluBmtNJr2BLSxcdfnV0b2FO+Iz4MF/7v5x/Xy0WpHS34acZ59PCE2EGH933zvN tbQg1mx1RlIgs3Jdtjhj1vtisAcl95eP+sEY9DRZeDmat5eeGhjjYr53mGP8LdYLrN V44XPv9t7GPGL+juuOmxIs9IB1EwUIpFHPgDIqqU= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by sourceware.org (Postfix) with ESMTPS id 035943858412 for <libc-alpha@sourceware.org>; Thu, 16 Dec 2021 20:06:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 035943858412 Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1BGInXur005097 for <libc-alpha@sourceware.org>; Thu, 16 Dec 2021 20:06:27 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 3cyknrktww-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <libc-alpha@sourceware.org>; Thu, 16 Dec 2021 20:06:26 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 1BGK5pgQ142155 for <libc-alpha@sourceware.org>; Thu, 16 Dec 2021 20:06:24 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2049.outbound.protection.outlook.com [104.47.66.49]) by userp3020.oracle.com with ESMTP id 3cvneu9m30-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <libc-alpha@sourceware.org>; Thu, 16 Dec 2021 20:06:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AAY+Xa0clka1vtldm5LwLWYlk9MYK9SyqlilZpNzEMCJVuxsdHWk4oJgPF9EW5kV1Q1YAiYv8Sa6Ni17c4C5fA/Oj/NV7ZPDObqo2l8GCyBdlJVG/d0Fahw5Ekn/yIQHuJsLdruD4nCmcQDNXYVr3DxKkVbhvRUEvcMLkAHCn3Kl4GMC08mRppvhc+aC6HG+fMcu/+S2oJpk9YON2O5zMK2BuDuJ/tZK84FU6LXoEnvrLztALqaK/wa0kv71iyyXJtp366o36nHHc8shonKxa+Yr0LesapGN61bjIyn1va2WXse30CYRhEU79j4e+3wkWFKsTcX/Od6ly0zV5IG+Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=L0LvaWadmR3/Ivq1IaK9ERE0d5BSmiJ75dEXNEWqagA=; b=D7gRRq7dWe1RHuX4SlNIcszfKCI1vTHDP0r0x1OXc6MpYXah29IfqUdtenQNrV1HLeS3YueTUuqAZOfQu3zB/429MvIMNT2rWA3277PWb3OJU3s17V3p9bG6mIS5LZ9PzeyQ5h5sVU0l+LFJ5T00rUDfKCJWEGG1GdPnn35wesFFwhtlNsRqnrUPiAwxhvB4ChpK4h4JRQvpKEyhsDiWZlwNZBKFlF4nXtu2Al6Zo87tNkf3+qkFXeAhCp8Fi7NTkGqQCSNB0okMms3lKo2DUzI/b2EoNEM7ltnqEsqs3tbIZze93aJDP3HnUAxXuLrGVT0Y5N31H12K45+SGhLxsw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none Received: from BYAPR10MB3208.namprd10.prod.outlook.com (2603:10b6:a03:159::10) by BYAPR10MB2774.namprd10.prod.outlook.com (2603:10b6:a03:8b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.17; Thu, 16 Dec 2021 20:06:21 +0000 Received: from BYAPR10MB3208.namprd10.prod.outlook.com ([fe80::cdd5:fa7c:b36d:dfd2]) by BYAPR10MB3208.namprd10.prod.outlook.com ([fe80::cdd5:fa7c:b36d:dfd2%2]) with mapi id 15.20.4755.028; Thu, 16 Dec 2021 20:06:21 +0000 To: libc-alpha@sourceware.org Subject: [committed] Remove upper limit on tunable MALLOC_MMAP_THRESHOLD Date: Thu, 16 Dec 2021 20:06:06 +0000 Message-Id: <1639685166-28543-1-git-send-email-patrick.mcgehearty@oracle.com> X-Mailer: git-send-email 1.8.3.1 Content-Type: text/plain X-ClientProxiedBy: BYAPR08CA0021.namprd08.prod.outlook.com (2603:10b6:a03:100::34) To BYAPR10MB3208.namprd10.prod.outlook.com (2603:10b6:a03:159::10) MIME-Version: 1.0 Received: from localhost.us.oracle.com (148.87.23.12) by BYAPR08CA0021.namprd08.prod.outlook.com (2603:10b6:a03:100::34) with Microsoft SMTP Server (version=TLS1_2, cipher=) via Frontend Transport; Thu, 16 Dec 2021 20:06:21 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3269618d-b52c-4dda-8697-08d9c0cf87bd X-MS-TrafficTypeDiagnostic: BYAPR10MB2774:EE_ X-Microsoft-Antispam-PRVS: <BYAPR10MB27744863175219417470FC19E4779@BYAPR10MB2774.namprd10.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yj5aYfzXC8dNkEUVu+Agkr/jzwWXJNSOHb3QtQrblX584cN536Ht2CXxzGjbJVRZuT0b+A0mT4h5UfmBdFoeYdtjR84wOKKY/BcYbNDfN+bjf2aWNK/VfOzTbWv/d8nV6IFQvfwOBfVQyHVXQwh2TaUdi7QI4bVsafJAGa6fFkrUsk7Qc0Ajh28TpKO2LmMULBYh3WbpWnMLg3k3nOg88Cvz/BhHx3wDnEnRdX2DDZhuRAAzjtD3NLL4macJZ1keM60IRcbm5rz6DAQBnA/dpZRbSts/dsn9KG7fgZh8sJRYw6Hoa0gqIymhEWMkoIIu6a0N8LAhLlNlp2cKkrqG/OABjVWVKXaXarCc2+fNEp1VqjHjWNUZwrQq8hWiPDtckWhgvg88pQ2pocXVfF+RwJ4d+3e4EJxZQ1TKtOAmU2jsXqELCanGzxJIeQ/4tyxYDEjsuRdsvBCLECAT/BpSA+lnJQeR1Y+POusQL/bKLbLVmXsvRB7sXJ7tAvKPcM3yMGRXUMM2ctanY1ZucNwgXObV1dPxbmiADsbkNp+NEvyFLk35/jNHqBjo/ZcFgUFW+NPK9vlKfeXbV0G++ENizaGtWLgAHyXOoqHvJ9MkkpUcyfl+ykWLmP/6qqINa9pU4Lvx8st4/VoZ+im3I79Abt8Aq4VVUiGn6ziSyjHL2p7e/HJupwx7iIiDhx/Ybxaao3Y6N7WcGd0P48Tp7dhmSg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR10MB3208.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(508600001)(66946007)(6666004)(26005)(38100700002)(5660300002)(66556008)(2616005)(8676002)(186003)(83380400001)(7696005)(316002)(52116002)(36756003)(86362001)(956004)(38350700002)(2906002)(8936002)(66476007)(6486002)(6916009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /CwDP+NEum8HiJ0Bg6BKM8S37M9gStAnVRtFFJGO7joUQFBeuXReVeqX1We00r6LKfpgqndYfhtW4SIt0OmdLWjAbhgY0Nz33N+4Jzq6Ut7UwtIG5BX9VNHPd4WW5Pgo/AhwXfLx7r90Z3X3pu2c5EJS3wKclal9v4tQyrFGxkFX0dtAF3m3WVLDV8sGudm2s9YmdsASuxRFqxzsirtceHEG6/SJ+ngFU6CIrZb176MqCAvgopIPtb5uIniEb4V1Hqsrb3hS4zsQFXeu84zM0XgxjM2W01eSNHSyVNzP323haYz4r9F8q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JzRc3t+fkmKps0c8RIggc7BylGvTY6WA9KaeqtWBGaKacTWCh2jCDBIRFFJHmNYdN5y2GLGHyqxEDx3R4AowmUseAsifUtFTXDLOBQ1kU7dryB4X5zoSPnQRG7DjYaz3PYGDGZLgi9hhXj/5PEi8qJr8F3IVnEvYSbUcmITw3I6a//uGMwL23xLcZ+mUKFYeUT9x3OUcf5T8F+ef98lum144jbaSWo2TEQWMDtRAVtGR1v7SbculeztPKdCLfQWRZ2WBspb8GE51b4qoGLDgDCdsqg== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3269618d-b52c-4dda-8697-08d9c0cf87bd X-MS-Exchange-CrossTenant-AuthSource: BYAPR10MB3208.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Dec 2021 20:06:21.8803 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: cinUpTUik8R+wUSqrgc8FAjNXuCUYeVvr5LVCcCEif56pc4kRit6tUN+amyJPWBbFlJ+XN/hpRakM+2mCzPS4QFYa8qG9rz8bLx+YjJ9Dik= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR10MB2774 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10200 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 adultscore=0 malwarescore=0 bulkscore=0 spamscore=0 mlxlogscore=999 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112160109 X-Proofpoint-ORIG-GUID: 788JZiJHuBcyuqWpcODlnPi-alrTGBsG X-Proofpoint-GUID: 788JZiJHuBcyuqWpcODlnPi-alrTGBsG X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 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> From: Patrick McGehearty via Libc-alpha <libc-alpha@sourceware.org> Reply-To: Patrick McGehearty <patrick.mcgehearty@oracle.com> Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org> |
Series |
[committed] Remove upper limit on tunable MALLOC_MMAP_THRESHOLD
|
expand
|
diff --git a/malloc/malloc.c b/malloc/malloc.c index b67f2c8..697cfc6 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -5330,16 +5330,11 @@ do_set_top_pad (size_t value) static __always_inline int do_set_mmap_threshold (size_t value) { - /* Forbid setting the threshold too high. */ - if (value <= heap_max_size () / 2) - { - LIBC_PROBE (memory_mallopt_mmap_threshold, 3, value, mp_.mmap_threshold, - mp_.no_dyn_threshold); - mp_.mmap_threshold = value; - mp_.no_dyn_threshold = 1; - return 1; - } - return 0; + LIBC_PROBE (memory_mallopt_mmap_threshold, 3, value, mp_.mmap_threshold, + mp_.no_dyn_threshold); + mp_.mmap_threshold = value; + mp_.no_dyn_threshold = 1; + return 1; } static __always_inline int
The current limit on MALLOC_MMAP_THRESHOLD is either 1 Mbyte (for 32-bit apps) or 32 Mbytes (for 64-bit apps). This value was set by a patch dated 2006 (15 years ago). Attempts to set the threshold higher are currently ignored. The default behavior is appropriate for many highly parallel applications where many processes or threads are sharing RAM. In other situations where the number of active processes or threads closely matches the number of cores, a much higher limit may be desired by the application designer. By today's standards on personal computers and small servers, 2 Gbytes of RAM per core is commonly available. On larger systems 4 Gbytes or more of RAM is sometimes available. Instead of raising the limit to match current needs, this patch proposes to remove the limit of the tunable, leaving the decision up to the user of a tunable to judge the best value for their needs. This patch does not change any of the defaults for malloc tunables, retaining the current behavior of the dynamic malloc mmap threshold. bugzilla 27801 - Remove upper limit on tunable MALLOC_MMAP_THRESHOLD Reviewed-by: DJ Delorie <dj@redhat.com> malloc/ malloc.c changed do_set_mmap_threshold to remove test for HEAP_MAX_SIZE. --- malloc/malloc.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-)