From patchwork Fri Jun 6 10:34:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cupertino Miranda X-Patchwork-Id: 113856 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 58724385AC38 for ; Fri, 6 Jun 2025 10:37:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 58724385AC38 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=bAKn6PR1; 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=u7LnwNEK 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 D44DC3857B84 for ; Fri, 6 Jun 2025 10:34:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D44DC3857B84 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 D44DC3857B84 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=1749206074; cv=pass; b=hXm4Z0iAAvn3qOyUXwhMXEVtr3pKYI7dcvctHVxu6TzQ5Gj/4U50a+ngUA4rh4+D1hhVDDmjeTlei0X1n+p3S54WCiZn1pOV+bRIdpU0IJ63bcJNRrRjcUj/ew72yqUY7OUSAoVXrf8DmipGh2PggXzEzHhH6sD64yzhv+ZRDas= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1749206074; c=relaxed/simple; bh=cjnBeazquyDDhX6bJBcq3cgjzn/toeLHlaqNMtV3AKA=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-Id: MIME-Version; b=BphYZP5NRm4oh8Iu196TKQvmY9yJ2Qq9PUSiP3vTVBU+RLuBhA/SaZscspog/TxqHAxMzoDbfMd8SQ2wdLzA+QC0bitHgCj42T+ceGN4Bxlo2XkokF/brXaCBx7ImWl7PVNq4bUJgf0IAcnQ9PBToI9INRzs90wj+V7wC3a54mo= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D44DC3857B84 Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5565NN1m029070; Fri, 6 Jun 2025 10:34: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=twRAEWmTKBN4GxTV5DG8hlKURq9rHpdLSnzeVJuyHsw=; b= bAKn6PR1sKcTVOmLyRLPMKEpLxyk43KhHWBAWPJTtAQqvFU9+y7GZrLZWQFrYrpd rK6dftwAoooUZKP9SvyaRlNXtO3Plb+UdkUWbDoIwib6tYyHTxnNrOwOqjAASUXh I7R7Vcf3/+ooE9DQJtrWFi9o04Ykfnz0UwHSYAvPjiV4vaTspGZ8CNYrb36+v+p+ 3lHm0kQFZBvDbdIYuFNVEa9N6lmfyuMyMGZL2bKfLf+7fSKDG+y+yYl6mUQeqeDW bogiZ8VpXh/AboGPqgXnMQJ7BtoPN4fiF+INsM3I8RqbqAsp06e4ZD+QYhTJOdkP 5Kk4heQs5+V67em8qEW8xQ== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 471g8gfpcb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 06 Jun 2025 10:34:30 +0000 (GMT) Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 5569fvH2038505; Fri, 6 Jun 2025 10:34:28 GMT Received: from dm1pr04cu001.outbound.protection.outlook.com (mail-centralusazon11010030.outbound.protection.outlook.com [52.101.61.30]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 46yr7d670h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 06 Jun 2025 10:34:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UbrfVylvi5lFIjxFnL98T9Bn0jvYESmC8pwLvYeQHl0/5fvjhGvXRkFzoSmcaHR4Rxd85327GU+KcuCevFVaejOVrU0SvRbD2pwix8vtGPR4WUQQnFMNrE0ucO9iHKR1TCE7hyoOsNDpr/ehn1TxpZLIZs7mY665CPj4vkocsn4UnOIQPctxyTSmPAMPFyRdSUE400wwq57EY1BETUuJvg/3nrwnVlZJXQalRf2WSWPxbGR2B2Q+Nc9ypCiMMzL4MioKoKlFsNWoWVsKMIzhVZ+e6H3mI+vUyjgWLN0VY5rB9OLYkTW6Vy7/ssq7dt0vRMDgZBHiYRoS0HtNzVyBLA== 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=twRAEWmTKBN4GxTV5DG8hlKURq9rHpdLSnzeVJuyHsw=; b=S7LodqVZI1LhXaq3bS9mIsfAu/qfhOa6Slr1RHaCS5vjd853DsSc5pyFBREUVnC2m1WcFO5Tev4vpIIgTfHc9/uKarqua6YgiLgWQzrPiFM7UYsHCx02RygxGoIy34jGxMPgl/zceGLCV9CUecs+bRhnx5VWGeC95z6oVotpv95n7gPD2pvkqhKzofsha/n5U9zvltn9eiWyJBQWGYbHMnJZAPFhQglwQOu6jVz/XxfyOo0wLhnbf6c//xBHx8w8cPpmv8xue/U9LlrmNYg8t0tBTBTDDvDGBcp7hp3pDvCJjemZd79/DEHB43zmFyeKYhy3tVlGocfThRLoyys/YA== 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=twRAEWmTKBN4GxTV5DG8hlKURq9rHpdLSnzeVJuyHsw=; b=u7LnwNEKqXuCW5xE7UWKnLXqPDas8gMHnZ6JPmVv2z9grda39DBCQuQgr0/XVrhNg2+eHooTyyPNcNDikY6zEqP5e4ZO9bUUDf6XFjCX4P9YO3Ciz97dG2EWE5U4FM4/YOjrDCQk/HV9qU53qXxTN4yqWTGjgtvsrOQ+fEs6dKA= Received: from MN2PR10MB4382.namprd10.prod.outlook.com (2603:10b6:208:1d7::13) by PH7PR10MB7783.namprd10.prod.outlook.com (2603:10b6:510:2ff::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8813.22; Fri, 6 Jun 2025 10:34:25 +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.8813.018; Fri, 6 Jun 2025 10:34:25 +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 v10 1/2] malloc: add tcache support for large chunk caching Date: Fri, 6 Jun 2025 11:34:11 +0100 Message-Id: <20250606103412.373640-2-cupertino.miranda@oracle.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20250606103412.373640-1-cupertino.miranda@oracle.com> References: <20250606103412.373640-1-cupertino.miranda@oracle.com> X-ClientProxiedBy: LO3P265CA0029.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:387::7) To MN2PR10MB4382.namprd10.prod.outlook.com (2603:10b6:208:1d7::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR10MB4382:EE_|PH7PR10MB7783:EE_ X-MS-Office365-Filtering-Correlation-Id: 5a0397ce-cdcb-46cd-d933-08dda4e5b533 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014; X-Microsoft-Antispam-Message-Info: 5TN7mDbBb6c4bY3eOBZ6uVrK/hkzkb3/DC+9jNSMbMB6SA+8u8FpagHZas7pF/hieZ3WOT/rv/QS9OUgfuMVsIkmXatbHyDWA3CtSpgd+dBWB+LqdCe/XuyAFChA2NOaRMpwbg3SM8yE3zqkTLw9ozyO3OlCVaX9jd1h8taU+sXbSYQAFkVKSNJP26SKQi1PCuH4TcuKN0TNuElEidSGhw1UOKFRBPT5LGcmxCYAk3YKwQWkEQ3mXu0vqWfayr+hwyDiPGtt2mqHBMuKd8rkNauTdS6VFX40el+CKA7ry84AxDyZxtuoJACsf2v415HrHTRTO7a15M78KFIPC17BraW7Cv2MQA7xyo2p61FYnM1rdPAuq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OVz9JwnSRY8fMs= 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)(1800799024)(366016)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: GP9CQ7YVq/Ch/gFUq36NdcN0LJWpR96LhBgl23wrzyBDRPcfo6YmHyFzvnefoFkeIAVfaWTEmCCAcCYbYEW3Gj4Wg0JoL40dq03vDiCdLLD4Pk8kGbJYEuV67D4lZH3fHZ4DeqzCYUK2RUl2tUxgAWuusPwby6qXLRLZFY8zoP2dqEtcC9OT1YulAt8K20sYogPSmCzU2VV2u5LfK4eG7C2pOTO4dBtlqzH+9CrmHJQU9+B9hk40vu41bpYm21e7dabs4q8QzTpdbpIcQggn9vmtBzgNtTYQtTSaXYCM3696x8XXDdw1d1nj0I0l5VsmH2JqVNF6hOE0lfx5QDzTfztGOX3Mu7kR2aW5bgCXt+SV9h/mrApFyd8nv+dQ6xqAjLlVP8TVfvVK+xZOxWR00fh3U9f8KEo1dzAcuYgvYOYwZ45pO/6Lvhp5LopSe1U5cn/T30ouQ1ZZygq23TcaCmldmVgqKJNVjWk9ORiFMd453juvb/jQSFXR1muT8YjGO1xPo3LvExwEnEEXXvsKZj+4jLWRIBmbx6Ws91ei5q0bTWybaHMwj46RpQRxOTqKMXGhDuYjlGDlgAzXfP8+wvwHUP8w3X4YjB+kCnYq5yc6oO496jIH6S9je45Ch//YCKFIQ+78o8dmoEIy0xPRPM4Suxkh/PmXozMu3diG4m2S7CeQ6QKcKlMAlYFVgOSN2UH3/sS8jPztW2xgR5LTSuxOdd2YpbNBBHsp/Xu3Dm2cH5TrBnLfJVs93Z2xNHlcoYDiEVll/2p+KUqm4oPsFTF2CH5RdoQVs0NQ1LUik6fqlh3/lSjTnbTCEtquhmeNjKbz3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9RnpRl83ON4cgsLT08+cHrPLvb5fBvk/5SweXrEXxl7mQRKwzRNeTaxIJSc3HizZ71J5DL9vdKxKAhLmIoGPp8vSutupVB8WVgmlkLBGauH6BZm1kq37cHHBUZGMVl7o2fPnHPiLtD7hAmSQ4P0ZcCAI1ojCKCJ0TFJt54lW+UTvsKPc1t0IFOHw4qiQMlbalv/bNeIxqZL+ajehnhG9ruyng5XrN9XqS3sgqlL/7Bc2pJcnix8CygkgqzTB4lre+B+k5DS9thWqFvWdM4yEpwkGj+CwvdD4DhyO7a7iciL4zpRij5xLUIYFwsVbF8ZgAE9tftN5avu2AqD4NcqZ2Tp0VL4e4+oA0U0GB79gQosPj23OcFJeA84pV2SZJe0JGzHa7Zxhttxii34yrycAkw= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5a0397ce-cdcb-46cd-d933-08dda4e5b533 X-MS-Exchange-CrossTenant-AuthSource: MN2PR10MB4382.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2025 10:34:25.3446 (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: GcouvzLg7/gHUsPjGwMB5zmM8KrsfwxSLsyCUGosFJ4+l+P3zPY0DUWddUr7gk7PLC6w0vM5deu/v6CRG25Fc6bNAQoGeOy1XM7g5cqA774= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB7783 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-06_03,2025-06-05_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 bulkscore=0 suspectscore=0 phishscore=0 mlxlogscore=999 adultscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2505160000 definitions=main-2506060096 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA2MDA5NiBTYWx0ZWRfX54FP//Ehbqbz U/MR3Wmfatq9UiGqjLdUMzlw2dBD4ZzfKeqP2v4+NzjZOg+73hjNyqL2HIfwYNXVLGG8Fd+AgoJ bX1g6T1Ya/hgyUfq8Y4NCLRLFAuM71Sbw9VCBdxqdA7vQujUpvnAnJdO+U0W4ZtgFjH3ACdx+Fb 1S9jbD1GrRue46dpk1+xHQZWNNb8zp7HbY+2bSdTT+52AAupg1bouyCltnu8fNa3id1GqXBQovX blhDtsfJldVd0Xte01u3bx3bvIsFjwPDC6a9IsxOwqg7U17pSgCHFURcsKWmM0WQCT4jVlXr7w0 K8yIEu0XEpjJPBh4PDro81OWwxYsJ7pUBNN790kIm9HuxhIYjsGH+ERNBjNPtCvTukwtl1fJ3IY krzi5zb3bZXM8YtLdzJZtshyNnZwFgmw0lG1oak/kTvEeXHHtFSlnaTk6laxehhj2I9XAT6n X-Proofpoint-GUID: JoROZKGVgyUjik30VS0PFf8Tkb6KJa-3 X-Proofpoint-ORIG-GUID: JoROZKGVgyUjik30VS0PFf8Tkb6KJa-3 X-Authority-Analysis: v=2.4 cv=H5Tbw/Yi c=1 sm=1 tr=0 ts=6842c436 cx=c_pps a=XiAAW1AwiKB2Y8Wsi+sD2Q==:117 a=XiAAW1AwiKB2Y8Wsi+sD2Q==: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 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. This patch now also changes the location for tcache initialization in case of a libc_calloc call. It was moved for the beggining of __libc_calloc2. This is actually semantically the same as the current implementation, which early check in __libc_calloc for tcache == NULL. Also, the function tcache_alloc_init was removed. It also now verifies if chunk was mmapped, in which case __libc_free will not add it to tcache. --- malloc/malloc.c | 298 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 216 insertions(+), 82 deletions(-) diff --git a/malloc/malloc.c b/malloc/malloc.c index c40b793f4a..57b9b443fb 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); +} + +static __always_inline tcache_entry ** +tcache_location_large (size_t nb, size_t tc_idx, bool *mangled) +{ + 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; } -/* Iterates through the tcache linked list. */ -static __always_inline tcache_entry * -tcache_next (tcache_entry *e) +static __always_inline void +tcache_put_large (mchunkptr chunk, size_t tc_idx) { - return (tcache_entry *) REVEAL_PTR (e->next); + tcache_entry **entry; + bool mangled = false; + entry = tcache_location_large (chunksize (chunk), tc_idx, &mangled); + + return tcache_put_n (chunk, tc_idx, entry, mangled); } -/* 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_get_large (size_t tc_idx, size_t nb) { - 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 (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 (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,27 @@ void * __libc_malloc (size_t bytes) { #if USE_TCACHE - size_t tc_idx = usize2tidx (bytes); + size_t nb = checked_request2size (bytes); + + 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 (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 +3537,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 +3546,19 @@ __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 (tc_idx < TCACHE_SMALL_BINS) + { + if (__glibc_likely (tcache->num_slots[tc_idx] != 0)) + return tcache_put (p, tc_idx); + } + else + { + if ((tc_idx = large_csize2tidx (size)) < TCACHE_MAX_BINS + && !chunk_is_mmapped (p) + && __glibc_likely (tcache->num_slots[tc_idx] != 0)) + return tcache_put_large (p, tc_idx); + } } #endif @@ -3646,27 +3761,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 +3825,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 +3931,36 @@ __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 < 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 (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))); - if (__glibc_unlikely (mtag_enabled)) - return tag_new_zero_region (mem, memsize (mem2chunk (mem))); + 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 clear_memory ((INTERNAL_SIZE_T *) mem, tidx2usize (tc_idx)); + return memset (mem, 0, memsize (mem2chunk (mem))); + } } } #endif @@ -3949,7 +4068,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 +4128,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 +4190,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 +4270,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 +5603,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 Fri Jun 6 10:34: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: 113855 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 A5D21385772F for ; Fri, 6 Jun 2025 10:36:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A5D21385772F 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=Llk1ATPl; 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=r2WQMcc5 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 7CCFF3857354 for ; Fri, 6 Jun 2025 10:34:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7CCFF3857354 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 7CCFF3857354 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=1749206079; cv=pass; b=mE+JVkV9wEDeW4whFrYGyqeFTdcjgAGAUcPp3qJ/pprSJqd/+3WKqM3t+Yb6SSXB4XBW9z2hZ9+ACjq/Vo6cPnsfhj0sE3thi4VcPisQMPYfTYD1AacFIOtF0mye5M19H1Ea+T5vo7XpOQBNi+d3JNsSTbE3oSqqgVu8RNhWQYw= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1749206079; c=relaxed/simple; bh=lim4WlNYvLk41qPTALOsgVvlaxd9Hzvur8WzsAFlk6U=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-Id: MIME-Version; b=l+LYPOaqk/jX5JWaF0iPD/OJf1h4LIHxdCARS2fzSzSX/0Aq7rzHlEEzwyzGbPMwOlQc2dlGITm2HTuQRDOuM42u7zch8sV7UQBtWNdKIrKLNHFSEJvhnE/AmKDXO9MOQjeTQ8Yyycai7AO1DesRfQlvqtQHBtIhcx3imBIM2Iw= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7CCFF3857354 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 5565NHPG012606; Fri, 6 Jun 2025 10:34:34 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=9US1LY8kN72hARk8kW2e/qS/17z69ARPdhgEQDDqXis=; b= Llk1ATPlj7y+5VxWGyYQKHfXQpY/8c3fDSFMKaPzxju8U0SYjJqT4eF2N4oUf2Sw 2Abt1GP/QCt0nLDrmAxCVjimth8Wy+xBaAp8Yz8d/sDHsJi93aWH7kkbGpIb4fa3 4xoQGaz+h2S3xwOollLwxFkpg+iFg3LYqJMCT/w01h+4djQj5NPHHEBDWqsRtmQY ciO+WTrzBYvs+oAXYIOJZ4CRJD5DjHuUU228qawEnrF0hyd1kLVVjamnnPhFW1nj YcQssGtI5J3q77+OKKhLp9v6vUArN2wNGkFO+7JO/fJXqZDED5s0xiLK+l9ORe3I DdYDcjzYp2vbG755DaNzcg== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 471g8j7u5d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 06 Jun 2025 10:34:33 +0000 (GMT) Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 55690RgN034915; Fri, 6 Jun 2025 10:34:33 GMT Received: from sj2pr03cu001.outbound.protection.outlook.com (mail-westusazon11012004.outbound.protection.outlook.com [52.101.43.4]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 46yr7dd07k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 06 Jun 2025 10:34:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wskh4D4IbeeyyzHa9IxA3UOydD9PXGwDSRxbGSr4PuxyA2OTMFk3X72fZqjarIPffT5eS09be/7tjQKEoqMECiFY1LJM3sastlGYKBiJD09nFfBHM8YwNcFZq7oPfkPReS8ls1VdIo9CFLymSuP8ktGTXBb4oXf7ZJ3e3DRTSK0Zu9MGlDEChAZuGsl3NdmTZxJTcETgH4rLlsrNdrSQyH3Da+mzVtL3zO5bP4ysOR8rsEdxKdIk51uKyddXwHSDcnCuj3uzOTY+c3YHzxLqIAoqBwlsdVB4P0qjXfMx422qAczn8xYW/Y/freFMy6mZHJClxEsQsybOI/gmNFUjQg== 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=9US1LY8kN72hARk8kW2e/qS/17z69ARPdhgEQDDqXis=; b=P5/nFDb5jOga3ZJTEV6F9MfvbJBAd6xzfMAXC6rJYzZmi7a1c5eVPCn7AetURaxvypaDxvBmE4r6cTCkW95i7CLm/0NWlj638DMWnS4734BDOGEVfC+lOFyvqXnSSYA/RLnCkaFp0DrbIx4WXpJIEcYudVX9P7G6ytQ0HKtozNZsDHeijlzYmkzblwdl7YdZ3QQhHcdZwXxrnHE6mk+FfOPuJZ1TeE/DlXRgoZse8tV4Yf6KpulvykPmlj9kTKEBcFFVa8k0pAEbpMk/JquUeuMgkhbwehqQlQywYeVnJpEmmJdL1MpZdUUiBsJNmpSWsW8xeJk18O9ttSL0SgyICw== 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=9US1LY8kN72hARk8kW2e/qS/17z69ARPdhgEQDDqXis=; b=r2WQMcc549gpNmSO1x3Jt+EkeB08h11AxjAaYOWEJeavAH4ycM1MasqwmEtzRwq2OJ+yGCGreMmFmNQF8yVYJcJNEtZzB8xfhBXnuAQABMaOzE6nw8APl1iAXGEbhwn4ZBbBR2PuzZwsnxI0h98kCQdeVrMjav2kqW/mfIqpDrc= Received: from MN2PR10MB4382.namprd10.prod.outlook.com (2603:10b6:208:1d7::13) by PH7PR10MB7783.namprd10.prod.outlook.com (2603:10b6:510:2ff::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8813.22; Fri, 6 Jun 2025 10:34:31 +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.8813.018; Fri, 6 Jun 2025 10:34:30 +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 v10 2/2] malloc: add testing for large tcache support. Date: Fri, 6 Jun 2025 11:34:12 +0100 Message-Id: <20250606103412.373640-3-cupertino.miranda@oracle.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20250606103412.373640-1-cupertino.miranda@oracle.com> References: <20250606103412.373640-1-cupertino.miranda@oracle.com> X-ClientProxiedBy: LO4P123CA0168.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18a::11) To MN2PR10MB4382.namprd10.prod.outlook.com (2603:10b6:208:1d7::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR10MB4382:EE_|PH7PR10MB7783:EE_ X-MS-Office365-Filtering-Correlation-Id: 481fe217-0dde-41d5-7f12-08dda4e5b881 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL: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Q3OU9R/OeOKQXST7yqwm56dZ9xtWtb0riWF+NJ95YaYLIoWzwlWBDqtbJE4MJeBS/QEcFFW9HYqOdc9fhCtf06ZNzaJ6OdHhLHJkBAF51n1+GSZMtNToQuR+2jLoxSULyNRzSpjCwCPNutfzMfCnMgL1PbI9aZl+j3E3Du4IrzLD3GnjIeli0fKA2qG5pfiiDTkBoPm3tnm8ir9DlXiHEsCP2SQcHirQqLSX2ZsL2YyZi5dsQx0r/HtWyGWekyYsq4nO5Lr/aiKas4MtNyC/zSD/v4wofIvfCo36lea/ObZpE1srabHhXCP9zdGGVJ0erbEnuep4th/ao1dRYdAcbKY7aqYF1rLxTYaw1G+Ww7NBSCML8qcSpdESYU6aFQWFxojKiHbfbughmJMYe2+b/nD4FiYVrdtVWNY= 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)(1800799024)(366016)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 82/O3H8PihQaO0ztmhfd3mRAqBSSELdcDlPjchsBLil+tfh0DSxp9VkBBbiZwQkg9PiV0rv54KT9g8ml2Gu2AL15sc0IypkFnZwUrQsgyUQ/HM5ob6ygFZRvaqNz89mMOn1tLvM8X6FJq7QkVaWjGaAXVzt/U7yQpFzjyOf+FQQbWCbt0WuDxN88JLKEI4rSpIrrlEp4cdurwalj3VkkpkD+NZch7pxoEBTRGCaijG7ys68TBrqM7qRDstoTAxW1UIruTmkeL8rlgz+Rq2CWroUZaQcDcEhOD+I5R5uNonwYIxCqRjk0NxGsd8Lb3sYKrZO9Z8vOxCajKiACNPh08ViHf/1Sx2xZcXbq5BQLTs40dJbo8r8nbNHPhYF+hkqLsqF4EfRJ6PBbXUP9P/HTIQSogcCP8hrPW7ksS5HfGlEH6xEBwgjus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ha+wOjNBieZxy1EYWkkgYNdxWQsyT/jNICvxcFSo+jByNQXyYKvu9mOeqKoopTanPwagC1hJ0KJ9sj1uoiq/i0uxb8KCVeBJJD9TTiTgUcsUXZ76sDgvHYg== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 8V0ynt1MccbdThtXjyjI8qwN6QpCrI8EVNAlFkcyEvsxYK+z9fG7QXBLvZimmAcvjXW4aQAXmnPTvXKN8tQp0CN87Mq5sANX1des912Cv5VDdAP4J/8WMqaGFDCj+OgJ3iq5XK62Ncm1P1X+RqX7Gdlu2zL5k9+dtt6Uq/1dD4Uuc+Rpw8jO+RL342xPbddsuawXub+yeZloy4HC/EOKw6WF3tvSAPLdSZXBOAxIR495I4WuSLu8zcrPcRX4TF2Gh9bhohQO1zoql8oOf502E4j0cBMb4TrbFhvhsTD/foXsGFKUzRuHhZ01UOARQ1GROVLdoCrXL2MZPWkQ30FRmce3cHSeyqz6PjTp+TEJvjR21kZ8w7FMKAgMSdKsFtBIvmsjrcnn2kgML00Ac2CSW1hxQmmdH7vEWYYmgJkXtzG8u+HtGMn0eCRAmyv2axXLwRQj0nKqMCTgm+Z2E1gYe78AZEofKwKgJuX5hCPgKCFt1sZOGzD4rzvBN/ESZ8Dm8WalTuJTUYj6KO0W+n1jEf+MVRnzF0E59HXvY6GWa9sBPYEAbfyb2hgtAWBtUcFWpdBlFud3k58ikRZDyPlHpZiVDFd3KEuqI9dm7lRhgEs= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 481fe217-0dde-41d5-7f12-08dda4e5b881 X-MS-Exchange-CrossTenant-AuthSource: MN2PR10MB4382.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2025 10:34:30.9034 (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: B5tRW7soTOqmVZSCnWd485IHqDU8G8wmSeCYy4cW5CiwNKvXbuEvfo/njeF/4+nta9igZgF2QNLJ+mg4ms+FLc2Vp6i1iJC8dxQKs8VuG5Q= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB7783 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-06_03,2025-06-05_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxlogscore=999 bulkscore=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-2506060096 X-Proofpoint-GUID: rJfpnj5g1hyZ-8iDBiyLTUw2ysUSRphf X-Proofpoint-ORIG-GUID: rJfpnj5g1hyZ-8iDBiyLTUw2ysUSRphf X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA2MDA5NiBTYWx0ZWRfX46RpdRzUUunR FqqLQjj7wXNVoh8E1U1z4ih3KaCEmB42Dxn/0nkLOdLory/odDNUo9NekHfjmjZd+gsa8zeeifl 8GOLFA6muO+SBNTu6pM3gWXA2J+j7vXTLolxtRcAKzw0Z7ktfFV451TTPLaDGm5E3ZePjd4mnI7 6mz6daf/YH57IgOCp3z66JaSmLsheCtt0FvhpYJEAgHHZMeaTOv9Jn6DPFFi2xq5XprqoC51+sZ ebNT0quXVaij4CDGdTEJGv1ix/RicCgdnygo2S1ArU98GRZHvOuF9lS97JTxpLQOi1vzwQbwbvP 5k3TcZrS58FcaR74f/QGIWLzGoHsioeaU3+ifVe4GEF84F3gscX0l8xJ/qVGXRsCfnkZarNixHv twSW2ocCA1ye6RbeAfyH4FCcBow5rKfBg0IxS65776FrFzs8MeQfzUe6NZGVSbyaM1uaOFbv X-Authority-Analysis: v=2.4 cv=QI1oRhLL c=1 sm=1 tr=0 ts=6842c43a b=1 cx=c_pps a=WeWmnZmh0fydH62SvGsd2A==:117 a=WeWmnZmh0fydH62SvGsd2A==: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 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". --- Rules | 19 +++++++++++++++++++ malloc/Makefile | 15 +++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/Rules b/Rules index ae23070845..5ba7e59d0e 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:glibc.mallc.tcache_max_large_capacity=4194303 +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..dd445d492e 100644 --- a/malloc/Makefile +++ b/malloc/Makefile @@ -147,6 +147,21 @@ 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-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