From patchwork Mon Mar 18 15:08:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 1913161 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=KQdBZzLe; dkim=pass (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=KQdBZzLe; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TyytZ2qMhz1yWy for ; Tue, 19 Mar 2024 02:09:10 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4C01A385840D for ; Mon, 18 Mar 2024 15:09:08 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on2078.outbound.protection.outlook.com [40.107.13.78]) by sourceware.org (Postfix) with ESMTPS id 4675A3858D37 for ; Mon, 18 Mar 2024 15:08:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4675A3858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4675A3858D37 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.13.78 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1710774533; cv=pass; b=efOMlkmwVjzdcdbbeeF5dR2fbiTsx65xLfRN/SK635T9vhOa0T8SWRW5jqZ8iAEuEKjJ63+2hIPtS9QjCC7pDf2h9pq5HgPTx2QqC4asqiO47xufL8E459w6AU15gzaKcNXXHEWywgAB6RC+3Ai44UeTU2sxykbHB6pN893/kSI= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1710774533; c=relaxed/simple; bh=PBRtVEouYA12zTCbxn95347t6IhyDMwB55pNrQMy9MA=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=oIo9r3//tqGHkHufhH2GXG+FqsW8oPs18RTpNrXveMkpj3p02LxjVoNeIWHXMvcJf0JcWqBchVpyvxJyCM0NrjlCxNhZYxTUZdJnDijeMJbMpf8/nQNztqwR4xg9P/S8zDyC1nHxYJjf8SV6dK0xnTzwwP9Y2uuGVS8kAeL4FwU= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=ofUaMyYDiEJFVnWb8dSBr/3dyxt3PUqAWpPXnispiaba1xFUu6dNxFy1QYKgDkp1mjUPtoPXnZFmbqaakWNsKNjcJ7dT3hJGJYxjLv6jJdlWQgDgANvISFkx2Tihw9GPYLwOVuzg1td9q5hsdXVGU9lA23egZRFEQZa8LU/fVCr+C4N8dmSN4sPj24aQU0psY4jngdYTif5lyUo/SWsEUQMvpx8CwFy2XTDmHHNLdB/InSHfgOjTh4+JvLxsnTn+MivQjM3u7PRnv6ygq2oJKgkTHMLjoqgNMPMgix9RA5jwrQ92RtWlpjyJ6EXCVths3IuWvIln4KzZkIR4cm8KYw== ARC-Message-Signature: i=2; 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=OoxZkwXDFOmR7oKoFoaVZ1ceCYzY816doofBZ3yVUJI=; b=i+1CSegI/OkbJQEK8EWw8d+uYEkfKqtjq7rwt7W1rpZUv614oxL7tbgHMSPzbdDcZPZ1i/LB5o5SHascaW1V7EhxdYzMQXtAtsp7lPG5BeN0on0goYTRVfmHlFS39acbYryWS0/89JK5bSiH60h/C0aFZH4kYeaLt1+O5iiuYnkn6GjuarqKFQvLH+kURDeb0ICf8uQk/minu1Bv3qygiszAGiHegN47e+1YJvoiZXk6PDfZZSF+JWV489dWjdOY6WGA+UjFpZlV877n/mzWCwUvlE2AoEnM7P78Be0Isjoj68Cg20HrXGithsfHQ2q298mmmCMyXHes3hu+4MyLbQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OoxZkwXDFOmR7oKoFoaVZ1ceCYzY816doofBZ3yVUJI=; b=KQdBZzLerawbZQTj5H2yvoTqAH1Re6ZB8whKsNt+D6ohjJr2KMvWEr1HMqj8RSeR29UASyI50r7tFYLePA7qZF9DMJMBgWNWjGNlxXvjxwRd2cOXeNOW+DMXns+GmNUCL2rRXfkISPxEAgGKD85GS4N/29nmuvoBf6Fn5QRV4I0= Received: from DB8P191CA0013.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:130::23) by AS2PR08MB9391.eurprd08.prod.outlook.com (2603:10a6:20b:595::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.26; Mon, 18 Mar 2024 15:08:39 +0000 Received: from DU6PEPF0000A7DD.eurprd02.prod.outlook.com (2603:10a6:10:130:cafe::36) by DB8P191CA0013.outlook.office365.com (2603:10a6:10:130::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.26 via Frontend Transport; Mon, 18 Mar 2024 15:08:39 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DU6PEPF0000A7DD.mail.protection.outlook.com (10.167.8.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.10 via Frontend Transport; Mon, 18 Mar 2024 15:08:39 +0000 Received: ("Tessian outbound 1b0f2681ce6f:v300"); Mon, 18 Mar 2024 15:08:39 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 698b36aba161ceee X-CR-MTA-TID: 64aa7808 Received: from 1763710648bc.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 919EAFDF-BB72-475F-BC29-4231BD2C1940.1; Mon, 18 Mar 2024 15:08:32 +0000 Received: from EUR03-DBA-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 1763710648bc.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 18 Mar 2024 15:08:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a7AFlLPNX12lIExGwVKCxEncVcshF802aHmvTCy0tl16jhUaqOBirvrSzTU2hwSfFDSenDFsdryi9LsELSRb2nOGCDdhyn686MNIzsJEdXlu2GF3mByDgozWO+ZHQS9pLswKwlVi664KPcFB1Ru+dtgnDnYnmmkQHrp44T+ozYaTuLsgVF2+NsCgOYAxYBZvouRzUp8j5xD6kfnJhujpW5Git4khCK6n+0TQ6Khxu12BrowMZuw+/ZSQTYkq8Fh5CFMxq6qVAKOuFdVvuP0sgVts2aN1sMKYs9APfeZLgyISu2AsEohsUyGobBmDbb6aSXcwb60RinC7/TO4REUwdw== 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=OoxZkwXDFOmR7oKoFoaVZ1ceCYzY816doofBZ3yVUJI=; b=dvSXPKPnL88mnUbDylz+QvrsdcmE+ISjsfQg9Ay3bDBGkjfLs5L10AYrqIJRytV4+lE1CtUraHSaHbUij+XBIrgoDdPJoB0+qHW7LNqwVAiaOHTXqSSsq7rY1gaxORspIDiV4JoaYA7FDURDybpsjSvPJpuAESzcHmS+rD32LAUEdFz4PgZwN82PVXwzvTHSbBa5VxrvDu95vUJjwvYbqWHz6MGAhQ5tp223eodTfbrkpeU3YD2E602YYKW9H2qkYwyqwpYyWC/i9F5aWul6Hw+8r1avk8S8viCVy3ZdV/BQeeyn3I69fCp5cSKDdCoL+dg9IXV/bqqhDFBjVt0BTQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OoxZkwXDFOmR7oKoFoaVZ1ceCYzY816doofBZ3yVUJI=; b=KQdBZzLerawbZQTj5H2yvoTqAH1Re6ZB8whKsNt+D6ohjJr2KMvWEr1HMqj8RSeR29UASyI50r7tFYLePA7qZF9DMJMBgWNWjGNlxXvjxwRd2cOXeNOW+DMXns+GmNUCL2rRXfkISPxEAgGKD85GS4N/29nmuvoBf6Fn5QRV4I0= Received: from PAWPR08MB8982.eurprd08.prod.outlook.com (2603:10a6:102:33f::20) by DBBPR08MB5945.eurprd08.prod.outlook.com (2603:10a6:10:1f7::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.26; Mon, 18 Mar 2024 15:08:30 +0000 Received: from PAWPR08MB8982.eurprd08.prod.outlook.com ([fe80::8b1b:5f28:5006:ac18]) by PAWPR08MB8982.eurprd08.prod.outlook.com ([fe80::8b1b:5f28:5006:ac18%4]) with mapi id 15.20.7386.023; Mon, 18 Mar 2024 15:08:30 +0000 From: Wilco Dijkstra To: 'GNU C Library' Subject: [PATCH] Benchtests: Improve large memcpy/memset benchmarks Thread-Topic: [PATCH] Benchtests: Improve large memcpy/memset benchmarks Thread-Index: AQHaeUXwMHHtR3Kc1UqGIHvnRELjUw== Date: Mon, 18 Mar 2024 15:08:30 +0000 Message-ID: Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-traffictypediagnostic: PAWPR08MB8982:EE_|DBBPR08MB5945:EE_|DU6PEPF0000A7DD:EE_|AS2PR08MB9391:EE_ X-MS-Office365-Filtering-Correlation-Id: 2f14b83e-c96f-4462-9a9f-08dc475d4afd x-checkrecipientrouted: true nodisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 8FaBGHuTFsP+v3MPyZtWXdiN6j9Za+zY1U5F2S4UOtftf5r6mnnyo/GfB6TsmO+rv/AvDttIp18/dJDLRejWugmw6rylyvY+Ks1lGRz9+tjTcsnhKMtuZkZWwqorDLE2+wYXeWKin7Gu2lz8iSwSds10Rhq9c2Mm4847wuGiEK7ohsP7AoM1oGEtEvdVBjmnflVLOQjUr3BOljHmsOPeEEfqX4mzVa4AKQk9G8fSOdVzvx79meoH/tVVTE80Ss+yZh4/k/gElqqrqvOd1xRqsHEKTtBQTkgu7ochW/bdAu8D+nkwH1yjfOn1MCGwNWUMSWJGNYe+SNy6T/wOkVXcwBSeo1yx5O14OODPKd8gHqnB/shWpAEcfoEFaClTIx3t9tNO3ByL2qCOg91kt0qB8Ih6xFZj3ikrNzg+dnCPrzdSkGmxUwsnLfpm5rr11jmaFUjI9WdllS56DNc43IF/ddSDzTCks9nnU8DmY/5Sf9/ABWHLDr4BxTFthDqBsV5vib0Csb2a7yToWTJg1FtTw0l+ostPTj3kyYjo1lp/jAevhNgbLR8nij6p0g5k42j1IYlmrh8nia+ddW6JW1gYjpRagLLNK6QxzVuN98eipiOMHv6SuzCkIpWGC7T5iYTz5hEigtQoQ/ZLrE2RzswIKN6q0J/NcZa9avX2sECdffE= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAWPR08MB8982.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366007)(376005)(1800799015)(38070700009); DIR:OUT; SFP:1101; MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB5945 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DU6PEPF0000A7DD.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 6f06f163-030b-480b-4e09-08dc475d45b4 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FHYry0S9fvVKDD9vHHP783HInXq5Ug0X5TVZNLQiy+04Lg7fIpsL6O9Xq0nERhHK5p4w6GTOUICkGih0eRCs8djMpub6BU6oPVirEU13AUgaBdJsyzOS45L8jNPdUbw1GYRNj/M/OWERZVrxbT7rQs9NejaxG0CjP+GpIcNlq9veB8ApHWTAVP5lEdo31r+Ha+r/7Uv5n7d7ELzroa5hvWy9gY56D1geMKmqAJFC3169nDg0Z01ujYYy0Xx8w5O5pEPOG4N7DcNGyuhhcs4V62nMBSkNhuamGL0DQu+bNqurNK1D0AsJXf4NqigZF7RYcWUROc2MAX0R5h27a9/vobvChJveFZZ9nEMCB2QHeRQX5BB9i1Rp3cvj1GvjlHTd6gsY3P7bw4KpD7vEYHvGj2fhD+dERPE348z2n+t/8uPYWyLxjKtUzQGgz0nTyZJQUe4Nc+RSvCUvCuqYzmkJionZtfVF2SXm4PZMNbLWUN+FuBH7htf3ZLPVei8bA5S3WXXtEVmylXi/IZAkG4SFGOwqVEDlUZCTsn7PfNM5VZMsKRo25cMhXV/PV6Yl/WhBKo0CK/bMitKNvPpULMpjh/ygaacPqJIGA51QpK8fyAtPnBAabVLwkKD/yXdqUcFoWJ5WlkAjnAQ3Thm5O5dXKATl+7M1Q/Dbi6DNK72nN83KaIGQTgamwHsa1xLZOra5+m8cVd4G4K7c0nqINmKhpg== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230031)(1800799015)(36860700004)(376005)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Mar 2024 15:08:39.5276 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2f14b83e-c96f-4462-9a9f-08dc475d4afd X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DU6PEPF0000A7DD.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB9391 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, KAM_LOTSOFHASH, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY 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+incoming=patchwork.ozlabs.org@sourceware.org Adjust sizes between 64KB and 16MB and iterations based on length.  Remove incorrect uses of alloc_bufs (since we're not interested in measuring Linux clear_page time). OK for commit? diff --git a/benchtests/bench-bzero-large.c b/benchtests/bench-bzero-large.c index 7076c0a17b00d76c26aa6adb4c3cc0aedcf69955..dea414ec8d1bb160409725996244178ee4fa93fd 100644 --- a/benchtests/bench-bzero-large.c +++ b/benchtests/bench-bzero-large.c @@ -22,9 +22,8 @@ #else # define TEST_NAME "bzero" #endif -#define START_SIZE (128 * 1024) -#define MIN_PAGE_SIZE (getpagesize () + 64 * 1024 * 1024) -#define TIMEOUT (20 * 60) +#define START_SIZE (64 * 1024) +#define MIN_PAGE_SIZE (getpagesize () + 16 * 1024 * 1024) #include "bench-string.h" #include "json-lib.h" @@ -52,7 +51,7 @@ IMPL (memset_zero, 0) static void do_one_test (json_ctx_t *json_ctx, impl_t *impl, CHAR *s, size_t n) { - size_t i, iters = 16; + size_t i, iters = (MIN_PAGE_SIZE * 64) / n; timing_t start, stop, cur; TIMING_NOW (start); @@ -74,20 +73,13 @@ do_one_test (json_ctx_t *json_ctx, impl_t *impl, CHAR *s, size_t n) static void do_test (json_ctx_t *json_ctx, size_t align, size_t len) { - align &= 63; - if ((align + len) * sizeof (CHAR) > page_size) - return; - json_element_object_begin (json_ctx); json_attr_uint (json_ctx, "length", len); json_attr_uint (json_ctx, "alignment", align); json_array_begin (json_ctx, "timings"); FOR_EACH_IMPL (impl, 0) - { - do_one_test (json_ctx, impl, (CHAR *) (buf1) + align, len); - alloc_bufs (); - } + do_one_test (json_ctx, impl, (CHAR *) (buf1) + align, len); json_array_end (json_ctx); json_element_object_end (json_ctx); diff --git a/benchtests/bench-memcpy-large.c b/benchtests/bench-memcpy-large.c index 7b2c5530af3883acc4b3895cb11667e6ff1a55ff..9e544a4729197f886f6cb092ec225004b586d197 100644 --- a/benchtests/bench-memcpy-large.c +++ b/benchtests/bench-memcpy-large.c @@ -19,10 +19,9 @@ #ifndef MEMCPY_RESULT # define MEMCPY_RESULT(dst, len) dst # define START_SIZE (64 * 1024) -# define MIN_PAGE_SIZE (getpagesize () + 32 * 1024 * 1024) +# define MIN_PAGE_SIZE (getpagesize () + 16 * 1024 * 1024) # define TEST_MAIN # define TEST_NAME "memcpy" -# define TIMEOUT (20 * 60) # include "bench-string.h" IMPL (memcpy, 1) @@ -36,7 +35,7 @@ static void do_one_test (json_ctx_t *json_ctx, impl_t *impl, char *dst, const char *src, size_t len) { - size_t i, iters = 16; + size_t i, iters = (MIN_PAGE_SIZE * 8) / len; timing_t start, stop, cur; TIMING_NOW (start); @@ -59,12 +58,7 @@ do_test (json_ctx_t *json_ctx, size_t align1, size_t align2, size_t len, char *s1, *s2; size_t repeats; align1 &= 4095; - if (align1 + len >= page_size) - return; - align2 &= 4095; - if (align2 + len >= page_size) - return; s1 = (char *) (buf1 + align1); s2 = (char *) (buf2 + align2); diff --git a/benchtests/bench-memmove-large.c b/benchtests/bench-memmove-large.c index a09dd3678848a3bf8612732439700eb8ef5d82ea..fd504653f681b172800cc34e054cc745180aa4fa 100644 --- a/benchtests/bench-memmove-large.c +++ b/benchtests/bench-memmove-large.c @@ -16,12 +16,10 @@ License along with the GNU C Library; if not, see . */ -#define BASE_PAGE_SIZE (1024 * 1024) -#define START_SIZE (4 * 1024) +#define START_SIZE (64 * 1024) #define MIN_PAGE_SIZE (getpagesize () + 16 * 1024 * 1024) #define TEST_MAIN #define TEST_NAME "memmove" -#define TIMEOUT (20 * 60) #include "bench-string.h" #include "json-lib.h" @@ -33,7 +31,7 @@ static void do_one_test (json_ctx_t *json_ctx, impl_t *impl, char *dst, char *src, size_t len) { - size_t i, iters = 16; + size_t i, iters = (MIN_PAGE_SIZE * 8) / len; timing_t start, stop, cur; TIMING_NOW (start); @@ -54,13 +52,8 @@ do_test (json_ctx_t *json_ctx, size_t align1, size_t align2, size_t len) size_t i, j; char *s1, *s2; - align1 &= 127; - if (align1 + len >= page_size) - return; - - align2 &= 127; - if (align2 + len >= page_size) - return; + align1 &= 4095; + align2 &= 4095; s1 = (char *) (buf2 + align1); s2 = (char *) (buf2 + align2); diff --git a/benchtests/bench-memset-large.c b/benchtests/bench-memset-large.c index a1f33245d4960c1e82fc441b5faf322204035202..c3f9ee0cd75d3cb30f8b3df15672f895c111fc28 100644 --- a/benchtests/bench-memset-large.c +++ b/benchtests/bench-memset-large.c @@ -18,9 +18,8 @@ #define TEST_MAIN #define TEST_NAME "memset" -#define START_SIZE (128 * 1024) -#define MIN_PAGE_SIZE (getpagesize () + 64 * 1024 * 1024) -#define TIMEOUT (20 * 60) +#define START_SIZE (64 * 1024) +#define MIN_PAGE_SIZE (getpagesize () + 16 * 1024 * 1024) #include "bench-string.h" #include "json-lib.h" @@ -35,7 +34,7 @@ static void do_one_test (json_ctx_t *json_ctx, impl_t *impl, CHAR *s, int c __attribute ((unused)), size_t n) { - size_t i, iters = 16; + size_t i, iters = (MIN_PAGE_SIZE * 64) / n; timing_t start, stop, cur; TIMING_NOW (start); @@ -53,10 +52,6 @@ do_one_test (json_ctx_t *json_ctx, impl_t *impl, CHAR *s, static void do_test (json_ctx_t *json_ctx, size_t align, int c, size_t len) { - align &= 63; - if ((align + len) * sizeof (CHAR) > page_size) - return; - json_element_object_begin (json_ctx); json_attr_uint (json_ctx, "length", len); json_attr_uint (json_ctx, "alignment", align); @@ -64,10 +59,7 @@ do_test (json_ctx_t *json_ctx, size_t align, int c, size_t len) json_array_begin (json_ctx, "timings"); FOR_EACH_IMPL (impl, 0) - { - do_one_test (json_ctx, impl, (CHAR *) (buf1) + align, c, len); - alloc_bufs (); - } + do_one_test (json_ctx, impl, (CHAR *) (buf1) + align, c, len); json_array_end (json_ctx); json_element_object_end (json_ctx);