From patchwork Mon Jun 16 11:40:12 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cupertino Miranda X-Patchwork-Id: 114520 Return-Path: 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 B86FB38083C1 for ; Mon, 16 Jun 2025 11:43:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B86FB38083C1 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=oracle.com header.i=@oracle.com header.a=rsa-sha256 header.s=corp-2025-04-25 header.b=ZnSl9LnZ; dkim=pass (1024-bit key, unprotected) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-oracle-onmicrosoft-com header.b=IV0tc2fY X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id 2BF5B3875DB2 for ; Mon, 16 Jun 2025 11:40:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2BF5B3875DB2 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=oracle.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=oracle.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2BF5B3875DB2 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1750074035; cv=pass; b=Bsy79OVzDKMxJ35C39n6XCZp6xBNZUCigrY6fSWcq0CcImuA/V6+dg1ZrnQ5pbzebAf9jAs4fJWxnuTtc58/jG6O4pGwj3zoeL/2mqdNbro5b01PCQD2gU/Xt9tFyhjvxdpzOSmFl5QtyI0xLAgTKEL5ZLhstvESVpCScRH19wU= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1750074035; c=relaxed/simple; bh=eH7IIg7y1rAE2tETrRgi7VM4iZvvOSITae6LpWFvjZk=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-Id: MIME-Version; b=S+J7EqZ9sJKNh3q7Nu+0X47oemjLWh0X58LbEaXSVe9NBsOhPMvgA5LTyfDgJNrFcRtTMOIrbuzqFNydVbaCIMDv/ykPjCT7A/u4Q8HoHDYf77BqgTDtX8Pgpd1n5iFaTD1mp2N03gPRPl1A5kDgQj4BDYS46gpnmd7OTQGG8mw= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2BF5B3875DB2 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 55G7fucO024916; Mon, 16 Jun 2025 11:40:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= corp-2025-04-25; bh=/OnCVTzzUv1eXJc+jm+2fhjFHAoqrlJ1QktUOl3fTq8=; b= ZnSl9LnZ634q/9OSPdeu1z7WnRHF5zhNXSAGZu7HjcBFNbx1iaXQ0vX03nu9WaO5 KnZKfXIooQLXDfhGqzY+HmTfioydCFeme9/ptZj5qiGqxc/z+cUxu6NPUx4FEHyE hf3Tmxs0oeL4WPi9Udo8dIQWK16L4b6XysWOQgH3OYlfUMItHUVrzJ+s+DX4zl1n FIe+v8zEgk9ZmUajawDqimiY+iwZAC4l9HE/pnsRSpHCmE4CWt+pGFY/LE0lFZAT 00glBw+K3B9O+6ffdHycVYMK1yCD6TpHQchdGk6yQO2hnOWd3GL9GVMS0IvenmvR JCdo0l/Cor0toYkcwQHRXA== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 479hvn1pf0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 16 Jun 2025 11:40:31 +0000 (GMT) Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 55GB0AqJ036443; Mon, 16 Jun 2025 11:40:30 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10on2088.outbound.protection.outlook.com [40.107.93.88]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 478yhe9up3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 16 Jun 2025 11:40:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ofOOSFqPet9pnh+U3JmyHgsZhTYLXhqdsl8M969O4VFmiPrnkB4fEBN9+apVdR3YAuDN3lr8BUXUxyCC12BmFVm2kyB8iR8m4QvL37St026w64N0SFmnJ4Ft4+8C0/8CiC7h7XoNrCRKi821k8jU0BxZp2at8op9xyMa6/KA06e0CLHDTqvYWYxtWqQ3jsodigHMtgeA1JPRG/+OZVjw0NJmv1NIkxOTyXIZ2wLQUixCXfLRgC+q5yzbu9KhstZBGyxhXSnbX2G0ycFyquPuueYxPKG/W/Rsd7qxnmAwvIcb3xmb9/0Gwnl3wBl0Fxfew5toe9YdO1H+Za4c0X5gaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=/OnCVTzzUv1eXJc+jm+2fhjFHAoqrlJ1QktUOl3fTq8=; b=UJJi+FEAHNEov4ImaYtAGQriW3esfqCpCh5b4XRmoT5fqzKQaRWIfheQFlpejJmrF9wun7kNJfnYKt4qNLXY8kAc3N8/Q8JoNHGFojdi3HIeGb45zh+EjJDLXqnQsVWXfP0Q12sdeICn2NZ6YZ4dpYK4Jq5mOJ3m9ZIlFhqFG/4MSBXlFDmtPRhpjC40XkCfgoBodOuN5bHmr+kw9vcIVvRpghqN/JaAk4k2K8Bnn3bR0R4/RjoJz1WMd4jr2Jv1A0Xw3vai2TsppGSP04jkhWqy7IY7LpwOCFl/EftY6jk9Uz4QYHMlcqDA0FZgZlHiuDb4Jbd60CzCG+MV89ISEA== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/OnCVTzzUv1eXJc+jm+2fhjFHAoqrlJ1QktUOl3fTq8=; b=IV0tc2fYGI2KCKOnKvkNSrEd8thRJ7agTKRJxn2rApdeGwpX6XOB9orPcyPaZZRqoDnGMS36ZVTkEBNxP2sR9M/PimumzTgHNRwcbT1zzjDxobDfOIfD679MYNLXqCV3OU9Lmrid6UswRqUBIPiXVP3jcQ7Xwv0fyfdls8TIgoo= Received: from MN2PR10MB4382.namprd10.prod.outlook.com (2603:10b6:208:1d7::13) by IA1PR10MB6808.namprd10.prod.outlook.com (2603:10b6:208:428::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8835.29; Mon, 16 Jun 2025 11:40:26 +0000 Received: from MN2PR10MB4382.namprd10.prod.outlook.com ([fe80::5033:84a3:f348:fefb]) by MN2PR10MB4382.namprd10.prod.outlook.com ([fe80::5033:84a3:f348:fefb%5]) with mapi id 15.20.8835.027; Mon, 16 Jun 2025 11:40:26 +0000 From: Cupertino Miranda To: libc-alpha@sourceware.org Cc: jose.marchesi@oracle.com, elena.zannoni@oracle.com, Wilco.Dijkstra@arm.com, dj@redhat.com, Cupertino Miranda Subject: [PATCH v12 1/2] malloc: add tcache support for large chunk caching Date: Mon, 16 Jun 2025 12:40:12 +0100 Message-Id: <20250616114013.881160-2-cupertino.miranda@oracle.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20250616114013.881160-1-cupertino.miranda@oracle.com> References: <20250616114013.881160-1-cupertino.miranda@oracle.com> X-ClientProxiedBy: LO3P265CA0003.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:bb::8) To MN2PR10MB4382.namprd10.prod.outlook.com (2603:10b6:208:1d7::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR10MB4382:EE_|IA1PR10MB6808:EE_ X-MS-Office365-Filtering-Correlation-Id: b0a59e9c-2a2a-4bbe-7e03-08ddacca966f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: upww9HQdwFLSDliUzWV3BslZOGg9DFyCVbSBI6JS4lWpCC4CM+FDSKQpp0t0xS+2z1l84m3NhdDRSlPKAK9jehVpDyYJwV0NjXorRK/NlZOMS91e/rVCKKcWG6GJcw8RxfiNExfpOJEYFtw+tHoEJt1kuC9BfdklLyBXxeNjbKR2SG24CGBPTMDGZjMiaPVh7Bvpmpc2/MKxTrczX3+9niAbnBX4kcce7MuBjB2OonVXrbQ2Bg917JrDwpeKpshi9KN9pIONHhJ2wGC/HdWG6rXa6mae/xYHKknL3ClThidJHuFkzYArmUAoLFamVt+QnwrMkRuUrZjkP0UN2fg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iDhqYr/w2L1HSCD18adefCfyn2QfTXQ= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR10MB4382.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: d5Z+HfE/oqzIpe1vZPzD66APKAKKOacRiqPvsFkgV4LirKEJm5pxAaNxe0vwmKdDJO1qsWl8dK+mIvzS0Ao173PHN77G/DoUj5ZpG5Lp9qCuuqvhl2UbCa2CXxL5bbdBXyZa29K7I7jq5HdN/oIQWKrcAUtusnew+lubgIAZ7ItbIJTnj/hNweq79qjV2WJSRXjMUFM7GPv+TcR0Pn5SCPaCG49kG8s8iekjA1r4oYHOzd+LH9LZH9eLvB6M+2oSnxUfz1t0PXeNLRpZqrcA7OVgoLMvkycti1QW53aewXFeQtZKaeik+S/R11x5Qan6kIoGEoba8q3w+GpWDyN8CaHaPSxe0r4j7qPXp9AcjX3ePTMeRd5TYD0TOy2qnnLF6Vo1LAE9uTxWPQTVa/VfgHgf5nn+5WfWkYypr8yiJkQsQe8ce424uPGjJA6wmTH4d+Vo3wx+3/lTclFrfT9tdj5Umucn1TzEritticMjnR1BNqFz6vfFz+Sgg0JEupJSIytb1/u25i5qYvWJRGxqYcDeqT88A3ozjgikvDVHYf2p+AtZVDtxRqHo//6zg46HIJM7jUh5Pz0qjpWkvybMaDTTk6aIvxWdEN34LdgkmV51WLcvSSGqTwgckOjtpXl9gXucpYCp9c8U/JCVFd1GfdKGlM0/TWi/EADyMi6e7uoCwgldNFGf2cll2LEuNI13ST7PC2xxTkYLc5qwjKKfhdRjL9Utqhy1K4aS2y3hoqyH6Pc+gPKul2eACDZUn3o74U8Guucc17P+PrEbkCnfioErdM7BeJj8sMBe7B45j24zU05WPmgjTCEKL/0bmLBDW5CD++ee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pw9QNUnScGxdB70DAYt3ygAGJA8K/C7brSBTsjJEdtUztcDtW5RNUxYJYIBEIoOQhAEEOofGATOtWHgDCrx9HBBp/i8ycZyCnq+BQXaGyCpy0xwXI9ft/13UrVi4cJnmJ2Uy8n9YI2LA8Hpx4GoEmC0MRdhOqR/65OXD9qfOO9Y5VNDG7+dVEwxnpn8TShisoV/1UKkrmW+vPbWqIo/G5o0i2a1nKL9e0IYTG/sWYD7UZXngLSy6zYkJfOLGpuGlPhqdZeRWs7NOjI0mzK4aiEjLfya5aALoB2BsbkrBceDmHKP6IYgAa9WkRLfk8L1WTrePSiO346hhhVuZXfEQ+pogSeZVj9HC0vg5WI9Z9vDdM4O3//+UUWwwLvNnpcIVMaiw3Kg= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: b0a59e9c-2a2a-4bbe-7e03-08ddacca966f X-MS-Exchange-CrossTenant-AuthSource: MN2PR10MB4382.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2025 11:40:26.6879 (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: 5psjSSBodR79iytfusOWA0DWi69db6iw3dKHKAvYwP7AOIE6uAEt1XW0E0YX3WDTsVu5ZTDUo0yfMbBE3/B7FSwjSVHCr0inXfxGdgSjOGw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR10MB6808 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-06-16_05,2025-06-13_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 bulkscore=0 phishscore=0 spamscore=0 suspectscore=0 malwarescore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2505160000 definitions=main-2506160072 X-Authority-Analysis: v=2.4 cv=XeSJzJ55 c=1 sm=1 tr=0 ts=685002af b=1 cx=c_pps a=e1sVV491RgrpLwSTMOnk8w==:117 a=e1sVV491RgrpLwSTMOnk8w==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=6IFa9wvqVegA:10 a=GoEa3M9JfhUA:10 a=P5qX2CLHeDGtx4If-FYA:9 cc=ntf awl=host:14714 X-Proofpoint-ORIG-GUID: xjKWwdFM4LXHVAy7hTgzKxu7qgS_T0ms X-Proofpoint-GUID: xjKWwdFM4LXHVAy7hTgzKxu7qgS_T0ms X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjE2MDA3MiBTYWx0ZWRfXwEvVd+Spl2OR WC4b9uF82cGzWDyhWUUrS9bFSYsq8+hvNumhf3Gu5rpvu40aKvzSxUhy71AAP0m7NU/WZfR6xt9 8QI0T9pL4x1fsLSWLdJNiHXyEBcX3h96quhm/mdejl14nSMa7ez4hpXyir3G2Zr7iIfgaxGndBf k/IebQWbMvg00Mgs23kt+eHyrRuDNbwoNstltGVjEHgeizc3T5G5WadN7VtL21y7hnqFfxB9xLx wad/Oa2ju6mJQgCkcMUBcaevkBXAF5CTxseg7ozKOuCwhIbQrhwbAV9cUDBF+HTkMsOcvQRTKOw 8EhvPH6pL0CtUab2lljypCEdpErb9r/6rnxanydTyfn05WQHZg99xD8Hm7q2DAFMVj43AtZaDo1 +udxxUx34XznIKa8nP823/OSY6CsYhMy+ZWa3wVN3tooFT8HQ8F+sZu8wAam9W4UvDT0kyub X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org Existing tcache implementation in glibc seems to focus in caching smaller data size allocations, limiting the size of the allocation to 1KB. This patch changes tcache implementation to allow to cache any chunk size allocations. The implementation adds extra bins (linked-lists) which store chunks with different ranges of allocation sizes. Bin selection is done in multiples in powers of 2 and chunks are inserted in growing size ordering within the bin. The last bin contains all other sizes of allocations. This patch although by default preserves the same implementation, limitting caches to 1KB chunks, it now allows to increase the max size for the cached chunks with the tunable glibc.malloc.tcache_max. It also now verifies if chunk was mmapped, in which case __libc_free will not add it to tcache. --- malloc/malloc.c | 309 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 227 insertions(+), 82 deletions(-) diff --git a/malloc/malloc.c b/malloc/malloc.c index c40b793f4a..3f91ff44b3 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -291,8 +291,10 @@ #if USE_TCACHE /* We want 64 entries. This is an arbitrary limit, which tunables can reduce. */ -# define TCACHE_MAX_BINS 64 -# define MAX_TCACHE_SIZE tidx2usize (TCACHE_MAX_BINS-1) +# define TCACHE_SMALL_BINS 64 +# define TCACHE_LARGE_BINS 12 /* Up to 4M chunks */ +# define TCACHE_MAX_BINS (TCACHE_SMALL_BINS + TCACHE_LARGE_BINS) +# define MAX_TCACHE_SMALL_SIZE tidx2usize (TCACHE_MAX_BINS-1) /* Only used to pre-fill the tunables. */ # define tidx2usize(idx) (((size_t) idx) * MALLOC_ALIGNMENT + MINSIZE - SIZE_SZ) @@ -592,6 +594,7 @@ void* __libc_malloc(size_t); libc_hidden_proto (__libc_malloc) static void *__libc_calloc2 (size_t); +static void *__libc_malloc2 (size_t); /* free(void* p) @@ -1893,8 +1896,8 @@ struct malloc_par char *sbrk_base; #if USE_TCACHE - /* Maximum number of buckets to use. */ - size_t tcache_bins; + /* Maximum number of small buckets to use. */ + size_t tcache_small_bins; size_t tcache_max_bytes; /* Maximum number of chunks in each bucket. */ size_t tcache_count; @@ -1930,8 +1933,8 @@ static struct malloc_par mp_ = #if USE_TCACHE , .tcache_count = TCACHE_FILL_COUNT, - .tcache_bins = TCACHE_MAX_BINS, - .tcache_max_bytes = tidx2usize (TCACHE_MAX_BINS-1), + .tcache_small_bins = TCACHE_SMALL_BINS, + .tcache_max_bytes = MAX_TCACHE_SMALL_SIZE, .tcache_unsorted_limit = 0 /* No limit. */ #endif }; @@ -3159,10 +3162,19 @@ tcache_key_initialize (void) } } +static __always_inline size_t +large_csize2tidx(size_t nb) +{ + size_t idx = TCACHE_SMALL_BINS + + __builtin_clz (MAX_TCACHE_SMALL_SIZE) + - __builtin_clz (nb); + return idx; +} + /* Caller must ensure that we know tc_idx is valid and there's room for more chunks. */ static __always_inline void -tcache_put (mchunkptr chunk, size_t tc_idx) +tcache_put_n (mchunkptr chunk, size_t tc_idx, tcache_entry **ep, bool mangled) { tcache_entry *e = (tcache_entry *) chunk2mem (chunk); @@ -3170,8 +3182,16 @@ tcache_put (mchunkptr chunk, size_t tc_idx) detect a double free. */ e->key = tcache_key; - e->next = PROTECT_PTR (&e->next, tcache->entries[tc_idx]); - tcache->entries[tc_idx] = e; + if (!mangled) + { + e->next = PROTECT_PTR (&e->next, *ep); + *ep = e; + } + else + { + e->next = PROTECT_PTR (&e->next, REVEAL_PTR (*ep)); + *ep = PROTECT_PTR (ep, e); + } --(tcache->num_slots[tc_idx]); } @@ -3179,10 +3199,10 @@ tcache_put (mchunkptr chunk, size_t tc_idx) available chunks to remove. Removes chunk from the middle of the list. */ static __always_inline void * -tcache_get_n (size_t tc_idx, tcache_entry **ep) +tcache_get_n (size_t tc_idx, tcache_entry **ep, bool mangled) { tcache_entry *e; - if (ep == &(tcache->entries[tc_idx])) + if (!mangled) e = *ep; else e = REVEAL_PTR (*ep); @@ -3190,40 +3210,109 @@ tcache_get_n (size_t tc_idx, tcache_entry **ep) if (__glibc_unlikely (!aligned_OK (e))) malloc_printerr ("malloc(): unaligned tcache chunk detected"); - if (ep == &(tcache->entries[tc_idx])) - *ep = REVEAL_PTR (e->next); + void *ne = e == NULL ? NULL : REVEAL_PTR (e->next); + if (!mangled) + *ep = ne; else - *ep = PROTECT_PTR (ep, REVEAL_PTR (e->next)); + *ep = PROTECT_PTR (ep, ne); ++(tcache->num_slots[tc_idx]); e->key = 0; return (void *) e; } +static __always_inline void +tcache_put (mchunkptr chunk, size_t tc_idx) +{ + tcache_put_n (chunk, tc_idx, &tcache->entries[tc_idx], false); +} + /* Like the above, but removes from the head of the list. */ static __always_inline void * tcache_get (size_t tc_idx) { - return tcache_get_n (tc_idx, & tcache->entries[tc_idx]); + return tcache_get_n (tc_idx, & tcache->entries[tc_idx], false); } -/* Iterates through the tcache linked list. */ -static __always_inline tcache_entry * -tcache_next (tcache_entry *e) +static __always_inline tcache_entry ** +tcache_location_large (size_t nb, size_t tc_idx, bool *mangled) { - return (tcache_entry *) REVEAL_PTR (e->next); + tcache_entry **tep = &(tcache->entries[tc_idx]); + tcache_entry *te = *tep; + while (te != NULL + && __glibc_unlikely (chunksize (mem2chunk (te)) < nb)) + { + tep = & (te->next); + te = REVEAL_PTR (te->next); + *mangled = true; + } + + return tep; } -/* Check if tcache is available for alloc by corresponding tc_idx. */ -static __always_inline bool -tcache_available (size_t tc_idx) +static __always_inline void +tcache_put_large (mchunkptr chunk, size_t tc_idx) { - if (tc_idx < mp_.tcache_bins - && tcache != NULL - && tcache->entries[tc_idx] != NULL) - return true; - else - return false; + tcache_entry **entry; + bool mangled = false; + entry = tcache_location_large (chunksize (chunk), tc_idx, &mangled); + + return tcache_put_n (chunk, tc_idx, entry, mangled); +} + +static __always_inline void * +tcache_get_large (size_t tc_idx, size_t nb) +{ + tcache_entry **entry; + bool mangled = false; + entry = tcache_location_large (nb, tc_idx, &mangled); + + if ((mangled && REVEAL_PTR (*entry) == NULL) + || (!mangled && *entry == NULL)) + return NULL; + + return tcache_get_n (tc_idx, entry, mangled); +} + +static void tcache_init (void); + +static __always_inline void * +tcache_get_align (size_t nb, size_t alignment) +{ + if (nb < mp_.tcache_max_bytes) + { + if (__glibc_unlikely (tcache == NULL)) + { + tcache_init (); + return NULL; + } + + size_t tc_idx = csize2tidx (nb); + if (__glibc_unlikely (tc_idx >= TCACHE_SMALL_BINS)) + tc_idx = large_csize2tidx (nb); + + /* The tcache itself isn't encoded, but the chain is. */ + tcache_entry **tep = & tcache->entries[tc_idx]; + tcache_entry *te = *tep; + bool mangled = false; + size_t csize; + + while (te != NULL + && ((csize = chunksize (mem2chunk (te))) < nb + || (csize == nb + && !PTR_IS_ALIGNED (te, alignment)))) + { + tep = & (te->next); + te = REVEAL_PTR (te->next); + mangled = true; + } + + if (te != NULL + && csize == nb + && PTR_IS_ALIGNED (te, alignment)) + return tag_new_usable (tcache_get_n (tc_idx, tep, mangled)); + } + return NULL; } /* Verify if the suspicious tcache_entry is double free. @@ -3299,7 +3388,7 @@ tcache_init(void) /* Check minimum mmap chunk is larger than max tcache size. This means mmap chunks with their different layout are never added to tcache. */ - if (MAX_TCACHE_SIZE >= GLRO (dl_pagesize) / 2) + if (MAX_TCACHE_SMALL_SIZE >= GLRO (dl_pagesize) / 2) malloc_printerr ("max tcache size too large"); arena_get (ar_ptr, bytes); @@ -3336,12 +3425,14 @@ tcache_calloc_init (size_t bytes) return __libc_calloc2 (bytes); } -# define MAYBE_INIT_TCACHE() \ - if (__glibc_unlikely (tcache == NULL)) \ - tcache_init(); +static void * __attribute_noinline__ +tcache_malloc_init (size_t bytes) +{ + tcache_init (); + return __libc_malloc2 (bytes); +} #else /* !USE_TCACHE */ -# define MAYBE_INIT_TCACHE() static void tcache_thread_shutdown (void) @@ -3359,8 +3450,6 @@ __libc_malloc2 (size_t bytes) mstate ar_ptr; void *victim; - MAYBE_INIT_TCACHE (); - if (SINGLE_THREAD_P) { victim = tag_new_usable (_int_malloc (&main_arena, bytes)); @@ -3395,10 +3484,32 @@ void * __libc_malloc (size_t bytes) { #if USE_TCACHE - size_t tc_idx = usize2tidx (bytes); + size_t nb = checked_request2size (bytes); + if (nb == 0) + { + __set_errno (ENOMEM); + return NULL; + } + + if (nb < mp_.tcache_max_bytes) + { + size_t tc_idx = csize2tidx (nb); + if(__glibc_unlikely (tcache == NULL)) + return tcache_malloc_init (bytes); - if (tcache_available (tc_idx)) - return tag_new_usable (tcache_get (tc_idx)); + if (__glibc_likely (tc_idx < TCACHE_SMALL_BINS)) + { + if (tcache->entries[tc_idx] != NULL) + return tag_new_usable (tcache_get (tc_idx)); + } + else + { + tc_idx = large_csize2tidx (nb); + void *victim = tcache_get_large (tc_idx, nb); + if (victim != NULL) + return tag_new_usable (victim); + } + } #endif return __libc_malloc2 (bytes); @@ -3431,9 +3542,7 @@ __libc_free (void *mem) check_inuse_chunk (arena_for_chunk (p), p); #if USE_TCACHE - size_t tc_idx = csize2tidx (size); - - if (__glibc_likely (tcache != NULL && tc_idx < mp_.tcache_bins)) + if (__glibc_likely (size < mp_.tcache_max_bytes && tcache != NULL)) { /* Check to see if it's already in the tcache. */ tcache_entry *e = (tcache_entry *) chunk2mem (p); @@ -3442,8 +3551,20 @@ __libc_free (void *mem) if (__glibc_unlikely (e->key == tcache_key)) return tcache_double_free_verify (e); - if (__glibc_likely (tcache->num_slots[tc_idx] != 0)) - return tcache_put (p, tc_idx); + size_t tc_idx = csize2tidx (size); + if (__glibc_likely (tc_idx < TCACHE_SMALL_BINS)) + { + if (__glibc_likely (tcache->num_slots[tc_idx] != 0)) + return tcache_put (p, tc_idx); + } + else + { + tc_idx = large_csize2tidx (size); + if (size >= MINSIZE + && !chunk_is_mmapped (p) + && __glibc_likely (tcache->num_slots[tc_idx] != 0)) + return tcache_put_large (p, tc_idx); + } } #endif @@ -3646,27 +3767,15 @@ _mid_memalign (size_t alignment, size_t bytes, void *address) } #if USE_TCACHE - { - size_t tc_idx = usize2tidx (bytes); - - if (tcache_available (tc_idx)) - { - /* The tcache itself isn't encoded, but the chain is. */ - tcache_entry **tep = & tcache->entries[tc_idx]; - tcache_entry *te = *tep; - while (te != NULL && !PTR_IS_ALIGNED (te, alignment)) - { - tep = & (te->next); - te = tcache_next (te); - } - if (te != NULL) - { - void *victim = tcache_get_n (tc_idx, tep); - return tag_new_usable (victim); - } - } - MAYBE_INIT_TCACHE (); - } + size_t nb = checked_request2size (bytes); + if (nb == 0) + { + __set_errno (ENOMEM); + return NULL; + } + void *victim = tcache_get_align (nb, alignment); + if (victim != NULL) + return tag_new_usable (victim); #endif if (SINGLE_THREAD_P) @@ -3722,7 +3831,7 @@ __libc_pvalloc (size_t bytes) return _mid_memalign (pagesize, rounded_bytes, address); } -void * +static void * __attribute_noinline__ __libc_calloc2 (size_t sz) { mstate av; @@ -3828,20 +3937,41 @@ __libc_calloc (size_t n, size_t elem_size) } #if USE_TCACHE - size_t tc_idx = usize2tidx (bytes); - if (__glibc_likely (tc_idx < mp_.tcache_bins)) + size_t nb = checked_request2size (bytes); + if (nb == 0) + { + __set_errno (ENOMEM); + return NULL; + } + if (nb < mp_.tcache_max_bytes) { if (__glibc_unlikely (tcache == NULL)) - return tcache_calloc_init (bytes); + return tcache_calloc_init (bytes); - if (__glibc_likely (tcache->entries[tc_idx] != NULL)) - { - void *mem = tcache_get (tc_idx); + size_t tc_idx = csize2tidx (nb); - if (__glibc_unlikely (mtag_enabled)) - return tag_new_zero_region (mem, memsize (mem2chunk (mem))); + if (__glibc_unlikely (tc_idx < TCACHE_SMALL_BINS)) + { + if (tcache->entries[tc_idx] != NULL) + { + void *mem = tcache_get (tc_idx); + if (__glibc_unlikely (mtag_enabled)) + return tag_new_zero_region (mem, memsize (mem2chunk (mem))); - return clear_memory ((INTERNAL_SIZE_T *) mem, tidx2usize (tc_idx)); + return clear_memory ((INTERNAL_SIZE_T *) mem, tidx2usize (tc_idx)); + } + } + else + { + tc_idx = large_csize2tidx (nb); + void *mem = tcache_get_large (tc_idx, nb); + if (mem != NULL) + { + if (__glibc_unlikely (mtag_enabled)) + return tag_new_zero_region (mem, memsize (mem2chunk (mem))); + + return memset (mem, 0, memsize (mem2chunk (mem))); + } } } #endif @@ -3949,7 +4079,7 @@ _int_malloc (mstate av, size_t bytes) /* While we're here, if we see other chunks of the same size, stash them in the tcache. */ size_t tc_idx = csize2tidx (nb); - if (tcache != NULL && tc_idx < mp_.tcache_bins) + if (tcache != NULL && tc_idx < mp_.tcache_small_bins) { mchunkptr tc_victim; @@ -4009,7 +4139,7 @@ _int_malloc (mstate av, size_t bytes) /* While we're here, if we see other chunks of the same size, stash them in the tcache. */ size_t tc_idx = csize2tidx (nb); - if (tcache != NULL && tc_idx < mp_.tcache_bins) + if (tcache != NULL && tc_idx < mp_.tcache_small_bins) { mchunkptr tc_victim; @@ -4071,7 +4201,7 @@ _int_malloc (mstate av, size_t bytes) #if USE_TCACHE INTERNAL_SIZE_T tcache_nb = 0; size_t tc_idx = csize2tidx (nb); - if (tcache != NULL && tc_idx < mp_.tcache_bins) + if (tcache != NULL && tc_idx < mp_.tcache_small_bins) tcache_nb = nb; int return_cached = 0; @@ -4151,7 +4281,8 @@ _int_malloc (mstate av, size_t bytes) #if USE_TCACHE /* Fill cache first, return to user only if cache fills. We may return one of these chunks later. */ - if (tcache_nb > 0 && tcache->num_slots[tc_idx] != 0) + if (tcache_nb > 0 + && tcache->num_slots[tc_idx] != 0) { tcache_put (victim, tc_idx); return_cached = 1; @@ -5483,13 +5614,27 @@ do_set_arena_max (size_t value) static __always_inline int do_set_tcache_max (size_t value) { - if (value <= MAX_TCACHE_SIZE) + size_t nb = request2size (value); + size_t tc_idx = csize2tidx (nb); + + /* To check that value is not too big and request2size does not return an + overflown value. */ + if (value > nb) + return 0; + + if (nb > MAX_TCACHE_SMALL_SIZE) + tc_idx = large_csize2tidx (nb); + + LIBC_PROBE (memory_tunable_tcache_max_bytes, 2, value, mp_.tcache_max_bytes); + + if (tc_idx < TCACHE_MAX_BINS) { - LIBC_PROBE (memory_tunable_tcache_max_bytes, 2, value, mp_.tcache_max_bytes); - mp_.tcache_max_bytes = value; - mp_.tcache_bins = csize2tidx (request2size(value)) + 1; + if (tc_idx < TCACHE_SMALL_BINS) + mp_.tcache_small_bins = tc_idx + 1; + mp_.tcache_max_bytes = nb; return 1; } + return 0; } From patchwork Mon Jun 16 11:40:13 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cupertino Miranda X-Patchwork-Id: 114519 Return-Path: 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 EC2AC38083CA for ; Mon, 16 Jun 2025 11:42:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EC2AC38083CA Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=oracle.com header.i=@oracle.com header.a=rsa-sha256 header.s=corp-2025-04-25 header.b=f2SFycdH; dkim=pass (1024-bit key, unprotected) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-oracle-onmicrosoft-com header.b=scMK831z X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id 1748738083C4 for ; Mon, 16 Jun 2025 11:40:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1748738083C4 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=oracle.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=oracle.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1748738083C4 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1750074039; cv=pass; b=oRhsj8P1L9LHnkdO0k3DFJOhhDb9FSdXWfXnckbh0b35YhFfHakszB1ibzIWBQQrmzBHCNOwGlIYaUzBPDflTQoETqMBx5+Yv+jHV64eLxlDKXV9DClXcIC1gFeqwF0meM6urmWieQHhfWm3FXHAUFjjTpu2PAMArBju4ZES2/M= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1750074039; c=relaxed/simple; bh=FLXHBO8yEWJpZOdLJcE8ZmYCJBk9ckLhelZutHBNp/U=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-Id: MIME-Version; b=YiPx5s8Onw2vx0NeY7SRvPBTA2I649SXd3P9HIVCXHuQ68ToKRBEyvXk6d17uhNK+Qs07VhS+CjaGDSikaaYO1G9qyFj9ISc18RdsV4/KVCih8e79+XAzMp7TLaAFwnkV+M/w+en85P+AilsXT61/xi1aDK+WYTqzvySWNKorh0= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1748738083C4 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 55G7fucP024916; Mon, 16 Jun 2025 11:40:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= corp-2025-04-25; bh=K6uw4Hu9xGNL3KWnZUbsbAukyqYWs3Lf9GaddzkUQ60=; b= f2SFycdHaTtYL9nbaWcKCT0GPTS0euPwYsGPkCrPCG9GNr+WrIjNaO9KfOu7B5tn e+U/0u1TjbgkFrn1tsUwyIQoQHz+LI/jFLJ2oMlBnCsxlkenxNJ3xkRuTsofvMNa VOAh6TCeeb9zB0JUOeGtGIbqV2jCdxvFHem17iXhTsTAOyxrA4D84mco0pCHP9tf qxEk3nqPosgHqsmTRgQ3EPY9FjdEsEwgI69kePEgLT652RkwTyQmQ4j/BvuC00Fe zuhMx48UOSY5broF0X2rnRuvpeONXFdyQKwxIiwbSAIdMxLnM4r2jcetRRzhMTS/ kyXEN+oZiimEN4TofHPijw== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 479hvn1pf3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 16 Jun 2025 11:40:36 +0000 (GMT) Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 55GB7YM3026045; Mon, 16 Jun 2025 11:40:35 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12on2047.outbound.protection.outlook.com [40.107.244.47]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 478yhe277p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 16 Jun 2025 11:40:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=kEk3ol4fW2htY94MwkH7jFh9cBXTfNS/4V3AB/6JubNI+DPn32SfPFNgfGYs9T8bdEFJc0L/PTiKGnupH5aVmZ395mkw/5F4+QTt5CvT6m2htnTFsts4uuXvfPzCUoV+FYAIQxJHrGbpDzsOFmUbW2zosASfZmprvQ1Uwb8GfPuE9JAeGafpyRxaUovI4pm4+avAwkzax3WJAtZjtSM+UjhVMiUt/k+37zy4G7qkycTdCFBIe1zU+oqdmtx2tn9r0ENJ1C91rSPxL0DGTD4UCE9sU6cA8xD9VJ1XSr/SFIk5aILxkRK/SpkwAu+DzF21jbAvokzwc5lDmF0n/Wm0LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=K6uw4Hu9xGNL3KWnZUbsbAukyqYWs3Lf9GaddzkUQ60=; b=lg/3S6eFboBvc1QC1ROeH5oSnTqfHv5aCqmOxA6JG/1+EmqnIlflj7+ymHmCjE2/kqs+CwPPUmFs44kyi1055+JGmfotczKKqni3dcXSQz1EcEPggbbr28zovX9lNQYDyVCM4Z7rWB3guGvNuCpJ615PX74XEQ46kP9MqVyNAGGBhepoOrRS+AiEE6LGHgGpJO4oSmy4bRavsNvI/ArOV475ywtMJ7+aVCQU6n+MlusBBl004wsud6tkhrIz85/8eOE1/dTppkB6NbAHgaMxk5JWU9QVPgNWjfhf4QJv8G0ptQ8STpHS/wwH87j7YpUY5rQ0GW/KtoOj/DAGZaFGTA== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=K6uw4Hu9xGNL3KWnZUbsbAukyqYWs3Lf9GaddzkUQ60=; b=scMK831zbGu/W6KYKHqItViSAONJVF1XRltozxgDZtIpgeD8i/VpHF8i0MuDwr5NqIpXXJyzCyTSb+noI+cS2t2HRGSmVRI7Qo9v3bH4gf0ong9B+lIU1pp+ayeL4bHcdYP7ARuNL7Gl/5kwOBh0eLvYyBIHI6y6tzMgHiWCdM4= Received: from MN2PR10MB4382.namprd10.prod.outlook.com (2603:10b6:208:1d7::13) by IA1PR10MB6808.namprd10.prod.outlook.com (2603:10b6:208:428::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8835.29; Mon, 16 Jun 2025 11:40:32 +0000 Received: from MN2PR10MB4382.namprd10.prod.outlook.com ([fe80::5033:84a3:f348:fefb]) by MN2PR10MB4382.namprd10.prod.outlook.com ([fe80::5033:84a3:f348:fefb%5]) with mapi id 15.20.8835.027; Mon, 16 Jun 2025 11:40:32 +0000 From: Cupertino Miranda To: libc-alpha@sourceware.org Cc: jose.marchesi@oracle.com, elena.zannoni@oracle.com, Wilco.Dijkstra@arm.com, dj@redhat.com, Cupertino Miranda Subject: [PATCH v12 2/2] malloc: add testing for large tcache support. Date: Mon, 16 Jun 2025 12:40:13 +0100 Message-Id: <20250616114013.881160-3-cupertino.miranda@oracle.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20250616114013.881160-1-cupertino.miranda@oracle.com> References: <20250616114013.881160-1-cupertino.miranda@oracle.com> X-ClientProxiedBy: LO2P123CA0011.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:a6::23) To MN2PR10MB4382.namprd10.prod.outlook.com (2603:10b6:208:1d7::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR10MB4382:EE_|IA1PR10MB6808:EE_ X-MS-Office365-Filtering-Correlation-Id: b37264b0-a747-4e54-3834-08ddacca99d4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-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9FeSHyZR5prOHYBTm+kDXVPhlOjBlKcelYknHKlUCmrHS+r9/RmOmxlx4EsJt7oBEOpTAJexjyeK+u1STGCBP7uwtYvP2pfKkyV+BtLhA+lXIHagCwUqqMfLWqhcEeB78CE3zn1i8g9HB+jBdYegTDp60eAeHFC/ZXX/OQTqEZGa4YOLTcHNft/LE7PSXyuGQ/KcsLRGywvFSjTKDC1dDHlQjKgl3wkM9WPXIsEYWZLBenmfJZRAGuCUDzmzku60orkN1vMzE8WtbfCkgIREKnAVigUCNiOj6bLny8nFnD7DrnbONfH6AiltMM6isieGERU7Fr8z4REFKK1lIpHy+JEtQIxfvgnk9v+i9h8kKoo9l1mXIt/nGXTez4Bs= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR10MB4382.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5XHDqWJFOGhsJJMsG+t0BO/Bq25lH1pqWbsNd6tEAqms01DWukWWKsyt+KTGIzLvfPOCGp7ETjsUcgvk22V/kfxuEUSyWw2Gl2H0Sz/IxiDhFGhqkqXQp5EWIZ+aMtDlaTVMpirp8EdEJreonPo/ACYMr10kePa3dszrd9bP+UKpn1BF1YHpg5CmflKxLFUMyguBwDq6+Tspqlnb8XziRQbc3APzsVnm0kSkDmQflNRBSr/4/+iEe+twPq+8e7kccwlD8x2+/kpC8WxM2f62gt/qrMfEor0CnLa0d41/mG3ZaoDRqGIIXTNhreVxfXDWXZImGcmq5q2CJS/r7Tdl3koq/JRgI8V3//FmMIo2Rq2pAMpc2dg0B47qo5WcRr5ovkk04cPvtK4aH0LZCRVSTQ2PbCDz92B9DubwLrURK9eveqjkeUMNoB5sHFsEir2k98JVPwhBFpTZ2kCoX4OqihpP/NCdo9+1HYx1lbf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MM20NcaDv8IkpZqj8X4MYN7FTN5GliEwozic3hvcbbfQ== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: ljDZjg1yVKNikN45QPKOexa29fv1WcahIKCXB62y9cstkFkk//s5C43FwUE0BYyYmnd9/5dsL3rnDaskSm/Eb3f4omCH5wk9A8MvUHMrNQjBSwLNtSTcV08lUyawpmaUmfaI+chPCueK8mCwKtTHm/8jqn00bypwnYvseVi3tH0v5q3UCEptti/fgyC+WoGdb93CoZ4ccaYGWOlEUO0JRirZQqI7XADgcUbCvayhB8K8ni3Hsy5MIpioxNHp4T0hAo5UfmdISi6NpxLo7lqYSEt7ryW+kQDsbnxrtTzwapD1m2QljN/2eNl2GzZZDeWK7mKusXh+c73Gn6+A8gumFnve95XSGbAdaJ3ykRk3/E8QeZakrHCe8KK6rk2bVpRmW8F6yEwq7c5pIs9djwRscYQVVbD6B/pSMdNSZowtLSfKVPZUOHI/YBn7c5NUjWa6q93e568bGGAzvZiVD+oNo4//zQuPH/PoryRmRfhfMReMoe7+t0IMnVRNwqHjyGwWo3+NEDfwwaYJQQopxAfbDEU/Nq9kqNAV0U0N7toGyVmSDNmwUcTt8nLRl9Zp2wil3NXgiOApu2bFzx2DiV2bCHwfITft3+dM3IyUgVDIBiQ= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: b37264b0-a747-4e54-3834-08ddacca99d4 X-MS-Exchange-CrossTenant-AuthSource: MN2PR10MB4382.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2025 11:40:32.2818 (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: Fjda1Nb8mqcBHBEI+18BxCUAnoOT9s5Kj1swAqREu8KVaIhN6QmKQF7FFLVJ7omaItKLln3sCkUbY+QSNNHBXtwssa5MJJIB05ty8oCHkiM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR10MB6808 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-06-16_05,2025-06-13_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 spamscore=0 phishscore=0 adultscore=0 suspectscore=0 mlxscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2505160000 definitions=main-2506160072 X-Authority-Analysis: v=2.4 cv=XeSJzJ55 c=1 sm=1 tr=0 ts=685002b4 b=1 cx=c_pps a=qoll8+KPOyaMroiJ2sR5sw==:117 a=qoll8+KPOyaMroiJ2sR5sw==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=6IFa9wvqVegA:10 a=GoEa3M9JfhUA:10 a=UNk5y27gxpWc-BwUjBAA:9 cc=ntf awl=host:13207 X-Proofpoint-ORIG-GUID: oI22GRz2AQmAWITcORMwYRWUarOmIUIx X-Proofpoint-GUID: oI22GRz2AQmAWITcORMwYRWUarOmIUIx X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjE2MDA3MiBTYWx0ZWRfX4/XaLFBSUnMK 43X51bwAwOT+BHEyyam9yP87PftCIjhg7EKPd+o1woT47RVoK8ASN13PK+DtCd3FSDamzvJV/s6 VasO8BxmoCfMzakwgwHxGknR6DSoRqUFsNmQ/3vu37pxl9mh7lhKl7+BUjAaH7jVxe0ctrvir8T tYlQImTbpBDzOuPnD2ljSw9eWgMqdqZeQvz9nJi15VqiBQeGLyMJmG/C0JHgHlo7HorhmfbbOax Eu2MCckmUJ/w52fnkIFyS2N7ONBNssBugOaG3sv3wBzHbZaSUsYsxx7eWp8QAMraEbeDt11A4O4 4q+OKhTE7qvYCR1PPK0j1i5lX95gDk1bWd8ppU+8uTrXt3LGioZP0Q0OXV+NAQPFpvcLWADuln6 H4Nt39uv3D+IdMqfSxBMbfUmGn+vVRz4k7aSQwYkepczM0WCtymwMd4Z1tcHEKvEyiPFGH55 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org This patch adds large tcache support tests by re-executing all of the malloc tests, using the tunables: glibc.malloc.tcache_max=1048576 glibc.mallc.tcache_max_large_capacity=4194304 Test names are prefixed with "largetcache". Reviewed-by: Wilco Dijkstra   --- Rules | 19 +++++++++++++++++++ malloc/Makefile | 16 ++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/Rules b/Rules index ae23070845..8fcbe6b6c4 100644 --- a/Rules +++ b/Rules @@ -153,6 +153,7 @@ tests: $(addprefix $(objpfx),$(filter-out $(tests-unsupported), \ $(tests-malloc-check:%=%-malloc-check) \ $(tests-malloc-hugetlb1:%=%-malloc-hugetlb1) \ $(tests-malloc-hugetlb2:%=%-malloc-hugetlb2)) \ + $(tests-malloc-largetcache:%=%-malloc-largetcache)) \ $(test-srcs)) $(tests-special) \ $(tests-printers-programs) xtests: tests $(xtests-special) @@ -165,6 +166,7 @@ tests: $(tests:%=$(objpfx)%.out) $(tests-internal:%=$(objpfx)%.out) \ $(tests-malloc-check:%=$(objpfx)%-malloc-check.out) \ $(tests-malloc-hugetlb1:%=$(objpfx)%-malloc-hugetlb1.out) \ $(tests-malloc-hugetlb2:%=$(objpfx)%-malloc-hugetlb2.out) \ + $(tests-malloc-largetcache:%=$(objpfx)%-malloc-largetcache.out) \ $(tests-special) $(tests-printers-out) xtests: tests $(xtests:%=$(objpfx)%.out) $(xtests-special) endif # $(run-built-tests) != no @@ -179,6 +181,7 @@ tests-expected = $(tests) $(tests-internal) $(tests-printers) \ $(tests-container) $(tests-malloc-check:%=%-malloc-check) \ $(tests-malloc-hugetlb1:%=%-malloc-hugetlb1) \ $(tests-malloc-hugetlb2:%=%-malloc-hugetlb2) \ + $(tests-malloc-largetcache:%=%-malloc-largetcache) \ $(tests-mcheck:%=%-mcheck) xtests-expected = $(xtests) endif # $(run-built-tests) != no @@ -211,6 +214,7 @@ binaries-mcheck-tests = $(tests-mcheck:%=%-mcheck) binaries-malloc-check-tests = $(tests-malloc-check:%=%-malloc-check) binaries-malloc-hugetlb1-tests = $(tests-malloc-hugetlb1:%=%-malloc-hugetlb1) binaries-malloc-hugetlb2-tests = $(tests-malloc-hugetlb2:%=%-malloc-hugetlb2) +binaries-malloc-largetcache-tests = $(tests-malloc-largetcache:%=%-malloc-largetcache) else binaries-all-notests = binaries-all-tests = $(tests) $(tests-internal) $(xtests) $(test-srcs) @@ -224,6 +228,7 @@ binaries-mcheck-tests = binaries-malloc-check-tests = binaries-malloc-hugetlb1-tests = binaries-malloc-hugetlb2-tests = +binaries-malloc-largetcache-tests = endif binaries-pie = $(binaries-pie-tests) $(binaries-pie-notests) @@ -290,6 +295,14 @@ $(addprefix $(objpfx),$(binaries-malloc-hugetlb2-tests)): %-malloc-hugetlb2: %.o $(+link-tests) endif +ifneq "$(strip $(binaries-malloc-largetcache-tests))" "" +$(addprefix $(objpfx),$(binaries-malloc-largetcache-tests)): %-malloc-largetcache: %.o \ + $(link-extra-libs-tests) \ + $(sort $(filter $(common-objpfx)lib%,$(link-libc))) \ + $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit) + $(+link-tests) +endif + ifneq "$(strip $(binaries-pie-tests))" "" $(addprefix $(objpfx),$(binaries-pie-tests)): %: %.o \ $(link-extra-libs-tests) \ @@ -339,6 +352,12 @@ $(1)-malloc-hugetlb2-ENV += GLIBC_TUNABLES=glibc.malloc.hugetlb=2 endef $(foreach t,$(tests-malloc-hugetlb2),$(eval $(call malloc-hugetlb2-ENVS,$(t)))) +# All malloc-largetcache tests will be run with GLIBC_TUNABLE=glibc.malloc.tcache_max=1048576:glibc.mallc.tcache_max_large_capacity=4194304 +define malloc-largetcache-ENVS +$(1)-malloc-largetcache-ENV += GLIBC_TUNABLES=glibc.malloc.tcache_max=1048576 +endef +$(foreach t,$(tests-malloc-largetcache),$(eval $(call malloc-largetcache-ENVS,$(t)))) + # mcheck tests need the debug DSO to support -lmcheck. define mcheck-ENVS $(1)-mcheck-ENV = LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so diff --git a/malloc/Makefile b/malloc/Makefile index 3d3822db31..2449047d24 100644 --- a/malloc/Makefile +++ b/malloc/Makefile @@ -147,6 +147,22 @@ tests-malloc-hugetlb1 = \ tests-malloc-hugetlb2 = \ $(filter-out $(tests-exclude-hugetlb2), $(tests)) +tests-exclude-largetcache = \ + tst-compathooks-off \ + tst-compathooks-on \ + tst-interpose-thread \ + tst-interpose-nothread \ + tst-interpose-static-nothread \ + tst-interpose-static-thread \ + tst-mallocstate \ + tst-malloc-backtrace \ + tst-malloc-usable \ + tst-malloc-usable-tunables \ +# tests-exclude-largetcache + +tests-malloc-largetcache = \ + $(filter-out $(tests-exclude-largetcache), $(tests)) + # -lmcheck needs __malloc_initialize_hook, which was deprecated in 2.24. ifeq ($(have-GLIBC_2.23)$(build-shared),yesyes) # Tests that don't play well with mcheck. They are either bugs in mcheck or