From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0053.outbound.protection.outlook.com [104.47.36.53]) by dpdk.org (Postfix) with ESMTP id DF8566CCA for ; Tue, 16 Aug 2016 16:02:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=harmonic.onmicrosoft.com; s=selector1-harmonicinc-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=/95YZEng3Cf75I0eYl1mXieOviva5r52B/qubTdSkSc=; b=qe1btXknwpz0IU19hE9voraC7rQnB2gK7rd2np6udrIJutg128JnN3HNYDamnbVisbKdFHy/0Rp6YiiabeAf2lY5qXd3jjjxErhstaJfI7j4iSzspgYrbq1zyTPzEpuA0Bw4S7FOLP865PiXLZ2vRASWoBdnYUJZbEp467WyMao= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Vladyslav.Buslov@harmonicinc.com; Received: from kms.harmonicinc.com (95.67.66.62) by CY4PR11MB1349.namprd11.prod.outlook.com (10.173.16.143) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.549.15; Tue, 16 Aug 2016 14:01:57 +0000 From: Vladyslav Buslov To: CC: Date: Tue, 16 Aug 2016 17:01:28 +0300 Message-ID: <20160816140128.10149-2-vladyslav.buslov@harmonicinc.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20160816140128.10149-1-vladyslav.buslov@harmonicinc.com> References: <20160816140128.10149-1-vladyslav.buslov@harmonicinc.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [95.67.66.62] X-ClientProxiedBy: AM5PR0101CA0022.eurprd01.prod.exchangelabs.com (10.169.240.32) To CY4PR11MB1349.namprd11.prod.outlook.com (10.173.16.143) X-MS-Office365-Filtering-Correlation-Id: 2ebf6a56-ca47-4bb2-0fab-08d3c5dde35d X-Microsoft-Exchange-Diagnostics: 1; C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xeAacb6Pgr4V75KwOgf4DmW9bD3mFnIYShw=; 20:CZVyXpVNo/nbaXCgsy25ryA4rCprX5hWv5fas7SOFYc7w9dgphh0TOGq1DlyTWzFjjyjUKH5YzxXl1/vj/ZZLrTO8bEsrFpdgFRM6S8US8G0iSSlVQUW242zXD8FCs/feglYU8KZ/2S2KcWOrmMCecf9CZMMhF53bj4ZygWnaqYFpYEYmjOE1qPIqzvqjnalPxP/WAqXCSVt2fP87IJkqSVXgY7/fZIk6g7z0t6BsaCKxNIa7yrfClOu3WR3Nv0iHvDTfx0fHGXHa5P1/VOcMGoTPloZAcBT4P5Fj5Iopo8UM/EmEVxxqXwBW9w9dZDjrXhOTQT11fwdwUlIizA6PN4dvpPZyBDaB4xAhUeFA8TRYPl4AqcmvQ+QgZxSteczwLtg2WHErNfo0yyM1fziWnrKsxGCfgAtMgUhI9Z1sVf4LPYIBAZSdKsBsxcyKD6kLPcLNo0a/LnncrN7V9hVfAgNAEKQMQU6MKIHwieqoAM6nap07tSIZ98tRuPNqiXR X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026); SRVR:CY4PR11MB1349; BCL:0; PCL:0; RULEID:; SRVR:CY4PR11MB1349; X-Microsoft-Exchange-Diagnostics: 1; CY4PR11MB1349; 4:accFAnpLxLzEEXuN9ubOauuHNqArdr2r39+XAZK8gp537utilLrgms8n3h9jbHEYUxTTacptc/X8vc1/VLYJMzoPNaVzEpi7HgRFDGLep3Ce/NNKWJyVXKdZyulQ2Nv9TD9O8mmJBMLVjy9RnDIj7VkblS4UFiV02RDIHLSGAKmX9I/pzuDVL7UUw4qdvCuSlnjcGDw9LegcJfoH+yTTcC9dHoSJQeQlfpR7OzKosjSDHFiz+Icni3ba2uuzHHs2abbyllg8AMNGXwWEsiNL1mC4NaTKHr/gJwVbpHlVlPocGnk8ks8Jtcu1DJPiVbt/xMC7J6H6tm+a6NucQFVJufW5mPsdwS2wcyVJrvSbz79tEk18KUbubF3uOGTZVy7QHvF1tCpEKDYhK0naRL7XgQ6wzN3SXuvZtT2Z3ZDv5Os= X-Forefront-PRVS: 0036736630 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(199003)(189002)(50226002)(101416001)(5003940100001)(47776003)(19580405001)(81166006)(53416004)(305945005)(77096005)(105586002)(7846002)(2950100001)(68736007)(7736002)(229853001)(42186005)(8676002)(106356001)(69596002)(2351001)(81156014)(92566002)(3846002)(1076002)(86362001)(6116002)(50466002)(76176999)(48376002)(19580395003)(110136002)(586003)(50986999)(36756003)(33646002)(189998001)(2906002)(4326007)(66066001)(97736004); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR11MB1349; H:kms.harmonicinc.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: harmonicinc.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR11MB1349; 23:BpT2WJ7fL+pRn7A1VSbmHKOUlDwP5mLxaQys+vyBL?= =?us-ascii?Q?oxTZ1eG8b0Du0Y8Z6Z8Jd23atZShDVkSRjsWXmgLJoHRYNok4pM2eP5aDIoq?= =?us-ascii?Q?3cgrryTi1Xn5uUFjLYX/QVBKo4Yoc5JOAIC69mshj0DV9LYlofmJY9x0n+tp?= =?us-ascii?Q?BCJCIZ+l+O1TuiWefoNdUhcx/V/Keg3bTqS5nmlqbNTIboOWXeB3iG4l25rJ?= =?us-ascii?Q?Zo7T1amoLmrbjLl8PNKkx6GR4jOD5HTFLVsrHxvEDAmM7L2+NjjlP1B+15ch?= =?us-ascii?Q?o5JekM1WHtGSbAQg+TumPwKs2hAyzERb1w9HSZhfa3BmcVZTYvd5V0HUo+Us?= =?us-ascii?Q?eKmX7DZ09SbC7t5ZsrG6UYAb8iVp+TQL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8ZtkZDQ2Te1oBSOE4hYSQOvT1mqq58spbz/K0LllXHc1/N4CYQMMoIDfzg3XAWnuW6mkgfOX/tv0aRI53ioGvUISNYmMqxP10/p2HEWD3ECLPUl2PdEAehDIZM9Vg9WfzLOCl7Bzete9pdnDZ2dtx7iPnVJhtwXRjqP6+x5WN4N0Nn3fUsY3ARZGIrsUwX/mfVoRZIuCLIh09uxNA9PFyBsTI9Q+vlQYIkNuPEQeJpUH3k4zrArvyByjezCA==; 5:L/nFEVBRLjCzyj6Nv4Qp3QIm6a2zL5HytUqO7WCz4X8rmMMlhcMb0GXbQeDrFBFeAya73Pw2yaTIj+T8dja0kRqSKfRGXHMBdAF3L8WEpK58sD3+pM/swVtIrKeZuYvnfaZzX9GcE217P9B0HPk4sA==; 24:xM3LhF0hleKRW+YBuRMxp+3/nSpqbPUGl1XvMFRtkIbLDPMGrHcINk88ECtlsOl0g+7s+DnP19vPJXnT9yiyCcMdeSClLOucc4xJcueJwS4=; 7:yqRWk3wX24dwtePZPgt2Fwoq7wrM4jFkDwba1iHjDP+gd2fk93xhDSDfHNvSadvt7VnhA7y34vbJgKQguskfUACHjaUvAsHSak/0ULpl8+CxJ1p0AAXr50MMnzADbfmT+0AJfEjyMUPT/2u05mvQfrcmrRGfIVOh4U+UVN9W57hbJS6I5nMZkoQ1iwCT0mjqiY1h/3epD1aLnvl1blyzxCN/iM9c1pEEcb0/VZ+0s3tRwaLJDjZJUfEqz69koBio SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR11MB1349; 20:1KDNTzhzosj0HRrRvPtxOwdjoXgtBg2jXRSg07n0m3urfJzJ+JBkIiHCNj52q8shL6EK4T2PcoMXxbk3kbZW8I5NSm67dwLKg1X248Ss0uiBo+mLsHLXxMw3BdMUiPBBkEy+X8MIcql2HI3AN/QKLFWHpnESYfVX3+EQ3lR36vU= X-OriginatorOrg: harmonicinc.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2016 14:01:57.5547 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR11MB1349 Subject: [dpdk-dev] [PATCH] acl: use rte_calloc for temporary memory allocation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Aug 2016 14:02:01 -0000 Acl build process uses significant amount of memory which degrades performance by causing page walks when memory is allocated on regular heap using libc calloc. This commit changes tb_mem to allocate temporary memory on huge pages with rte_calloc. Signed-off-by: Vladyslav Buslov --- lib/librte_acl/tb_mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_acl/tb_mem.c b/lib/librte_acl/tb_mem.c index 157e608..c373673 100644 --- a/lib/librte_acl/tb_mem.c +++ b/lib/librte_acl/tb_mem.c @@ -52,7 +52,7 @@ tb_pool(struct tb_mem_pool *pool, size_t sz) size_t size; size = sz + pool->alignment - 1; - block = calloc(1, size + sizeof(*pool->block)); + block = rte_calloc("ACL_TBMEM_BLOCK", 1, size + sizeof(*pool->block), 0); if (block == NULL) { RTE_LOG(ERR, MALLOC, "%s(%zu)\n failed, currently allocated " "by pool: %zu bytes\n", __func__, sz, pool->alloc); -- 2.8.3