From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5FE1BA034D for ; Wed, 23 Feb 2022 14:33:25 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 50B03426FA; Wed, 23 Feb 2022 14:33:25 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2081.outbound.protection.outlook.com [40.107.243.81]) by mails.dpdk.org (Postfix) with ESMTP id C9BF7411B2; Wed, 23 Feb 2022 14:33:22 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mKZ4eZPO5tHQxARD6JFW6ppBUDvc0zP1E0WrRfMMnBLSmgBUjk4tx+VEBU4CvFX94fch6mJbot+za1TxqQJOhQWutq2Gm/HoYXmMPLVzivXxLrjtQaI1NYtavsadT7p5sSDQil4BdWJvUjv6MgwTNJb5GgzCPi+lVmSEVey6j/C1E9f1M3YeVQYZt/H/zBLMul41nOKVBpquzzyB30k2p/NGB3zjoQrUwjtChFkiN2THAatYI4DG62I2+ilYXIqzzi7431ucb2Dlp/RjAM2TKxwM4cuwKvRbFXTxJq/IWv3l8VVrVBkIl8sRVi0szxVKp2O326JmOFH97iEoM6D67Q== 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=KeccYLNpLMfTAcGMMnPgT/YtcjpTFrQb2pQLXM0lv0w=; b=L2Z6cCxp+HSBywJBbFVL4mqTp62w4K3uRVnEYbq7H8hsLptB7qKBCQc+fGLuXyzlo/umrZ1Pj/TJFNpjV9Cv6Ne+S0ZoNvwQssnojsWzs53oVHBMGdM43ZSqwZpSUL6SJlc/UQ6GXxaKsw2F4Ob5HeX+Y89PPsEAVEaHzMl4+Fr6NAYPhJkF1GIAI0GUx1V2LJsjaeVkm9uVb9bSlze4wX6usGxTB73PEsOngd5GyOqu7ht0LJBrXKRf/igSWFR63LmphME7mdeih36lYpc0Bgg99qSKtavUTgV75A637xCiP0yosaRObCR3rsfkV5/DP/1NTQS6cf2pG4vXpbef0g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KeccYLNpLMfTAcGMMnPgT/YtcjpTFrQb2pQLXM0lv0w=; b=mgjbcklNvG27Dyf1h7SysVa4HB2simHYZJYP6zBxDkFsO5byhz4gn+KYH18+Ir01egLWnpBpjzyQKyc7MONGjcUsRwVnbqkXFPweotWkSgP6nuP2ynlR1xiOVswaOr/Fnn9OR7+ket3pWU7aSB/saOYoPFBtuC3I+vVutCci179ytMT8MTjgTt4LXgCs8Tw3N02+fjdIDAveoyOaCHakEQqfwmjA+c8zpwTFvOek3gb4uPOj7GR5kq7mi+VFDJ8d9I7WU4zznP8W5w93YMBAQiqsIRc2z7ZtEOcIyaUpDsj/Ozr2BcRUtOgcnacCByJfy0ST5NWQq8ZIdwv46kenlA== Received: from DM5PR10CA0009.namprd10.prod.outlook.com (2603:10b6:4:2::19) by MW3PR12MB4362.namprd12.prod.outlook.com (2603:10b6:303:5d::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.22; Wed, 23 Feb 2022 13:33:18 +0000 Received: from DM6NAM11FT041.eop-nam11.prod.protection.outlook.com (2603:10b6:4:2:cafe::83) by DM5PR10CA0009.outlook.office365.com (2603:10b6:4:2::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.23 via Frontend Transport; Wed, 23 Feb 2022 13:33:18 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.235) by DM6NAM11FT041.mail.protection.outlook.com (10.13.172.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5017.22 via Frontend Transport; Wed, 23 Feb 2022 13:33:18 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 23 Feb 2022 13:33:16 +0000 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9; Wed, 23 Feb 2022 05:33:14 -0800 From: Raja Zidane To: CC: , Subject: [PATCH] app/compress-perf: optimize ops pool allocation Date: Wed, 23 Feb 2022 15:33:07 +0200 Message-ID: <20220223133307.13608-1-rzidane@nvidia.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f56a77b8-1bbd-46da-3cd8-08d9f6d10d67 X-MS-TrafficTypeDiagnostic: MW3PR12MB4362:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: defkjqvNpkFRJGBD7anRuvaTAkDJL15qK6V0V3zgVWrLQgZPhmommNN4Q/24SaD0Sg4ZnXt80SNr5oW3wcSgIE68Bzcb8LWRfWHWO3+c/ZkFIJ8DGZec11dPjdB6qsmPItds6tWYkSXag+73M4Tto3+yE6P7ojDN++8PQG0YkyozEoZGTBNhFJx1SY59ljsF3ui70AvVmftfdnYVtATZPPL5W1SyBBbKHau0Uy5fiyDoTNcpBeZeo/Gt5xo9/uCD2jzdxoERPDQCEjqhqMEMZbwEfAiUMbufJ4BzYJ8KnJonmsWxqDTLraOq3ElEWAtWpen84Zp5fX0+2n2fNkkBHc8Rtd0WF68E2YXO9s25MmuHpgJyFKQRMaDeiyO1CEwuJF4v+d+G+DJVY2UsBmOst7pIYKZnjonqnolyKjrGpyvDHFcNInxmcqrUZ5IaVRCCovgZAAKuIWWVg9jfDPawP4t2m5IHiXPe2z7PmkbJuxIkxTCbXxIcXokqr2B1zt8orV+LmX+9lEhTMQwmgDwfUw3SjWtvXsZXgUqQ4RuR2UNIrJCGZ6mCA+POIsy8RtjjgC8fAE8vjDUzeyd4TNI+u9/3sbT8YmZMaEksVeA0whFTI5mjtjdXAOVK96IW2f5g4phWhj7+bGEVqEilULlDvoDTThqQBtLvxdfLhBCMwb4ExqhsmOoxN79obRqXP9stRUOkWCxMNXRyhMOIhsfhJA== X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(46966006)(40470700004)(36840700001)(7696005)(36860700001)(6666004)(70206006)(55016003)(70586007)(4326008)(81166007)(83380400001)(36756003)(316002)(356005)(82310400004)(508600001)(40460700003)(8676002)(6286002)(8936002)(54906003)(6916009)(47076005)(1076003)(426003)(336012)(186003)(26005)(450100002)(16526019)(2906002)(5660300002)(86362001)(2616005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Feb 2022 13:33:18.1853 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f56a77b8-1bbd-46da-3cd8-08d9f6d10d67 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT041.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4362 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org An array of the size of total operations needed for the de/compression is reserved for ops while enqueueing, although only first burst_size entries of the array are used. Reduce the size of the array allocated. Fixes: b68a82425da4 ("app/compress-perf: add performance measurement") Cc: stable@dpdk.org Signed-off-by: Raja Zidane --- Acked-by: Matan Azrad matan@nvidia.com app/test-compress-perf/comp_perf_test_cyclecount.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/test-compress-perf/comp_perf_test_cyclecount.c b/app/test-compress-perf/comp_perf_test_cyclecount.c index c215547291..a3f6404eb2 100644 --- a/app/test-compress-perf/comp_perf_test_cyclecount.c +++ b/app/test-compress-perf/comp_perf_test_cyclecount.c @@ -175,7 +175,8 @@ main_loop(struct cperf_cyclecount_ctx *ctx, enum rte_comp_xform_type type) /* one array for both enqueue and dequeue */ ops = rte_zmalloc_socket(NULL, - 2 * mem->total_bufs * sizeof(struct rte_comp_op *), + (test_data->burst_sz + mem->total_bufs) * + sizeof(struct rte_comp_op *), 0, rte_socket_id()); if (ops == NULL) { @@ -184,7 +185,7 @@ main_loop(struct cperf_cyclecount_ctx *ctx, enum rte_comp_xform_type type) return -1; } - deq_ops = &ops[mem->total_bufs]; + deq_ops = &ops[test_data->burst_sz]; if (type == RTE_COMP_COMPRESS) { xform = (struct rte_comp_xform) { -- 2.21.0