From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0086.outbound.protection.outlook.com [157.56.110.86]) by dpdk.org (Postfix) with ESMTP id 09670C5E8 for ; Fri, 29 Jan 2016 08:46:42 +0100 (CET) Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.localdomain.localdomain (122.167.54.52) by BY1PR0701MB1723.namprd07.prod.outlook.com (10.162.111.142) with Microsoft SMTP Server (TLS) id 15.1.390.13; Fri, 29 Jan 2016 07:46:38 +0000 From: Jerin Jacob To: Date: Fri, 29 Jan 2016 13:15:54 +0530 Message-ID: <1454053555-28850-4-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1454053555-28850-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1450067576-18803-1-git-send-email-jerin.jacob@caviumnetworks.com> <1454053555-28850-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [122.167.54.52] X-ClientProxiedBy: BM1PR01CA0030.INDPRD01.PROD.OUTLOOK.COM (25.163.198.165) To BY1PR0701MB1723.namprd07.prod.outlook.com (25.162.111.142) X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 2:UD/Z11OfVnrlU3GneeBL38DSZ2zJwlwVwVrICEyUGK6vqZingy93eftK0nnIDdVkyLH0C1zJz+w2xwbmK7Syc4buZ39ktiWERxiO2Mpj0bMWhfEYD8RPmBZCpMnMjy4Du+emnO1EZdty6AvpAAnh5Q==; 3:Amq81DaQ3wtYEPKx/iTb0u9FnGWRMtDDMnrlyGnRFLlDOt2ill72ex8aeCBfXxuU6z+t2y71sd2/C2FL5lS73BnVrPZKihGOx4z3ytUaItaS8X5iiVe1CaX8Raw2ZBDA; 25:YrB/sihtDdRmTwRSd3Qy+gUSXfwPlhgfUlqbmA8FLh+iSQgkfCsQh5F2oMEUSpgog6VLOA74Wy0Dnkir4dLR5aUC365R1tGRsHvS2vFqFqDUDuiiUlXXplZn4X3GzusYHWnKlcgfjbnnBHCNTiuQyn3/mQwmz4ApEhGzz0oJ91SHr/rUi/vQU6CaAiAY7FRmtiiIpUYGGnBKUHlYInCczjvh99iX9PHW/IPfCC3b7MqtUDWjtw6yXtsdKK8/Iku+ X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0701MB1723; X-MS-Office365-Filtering-Correlation-Id: 972cfc62-e258-4542-2b1e-08d328805359 X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 20:0/D/d7F1ChFz1PmSt4wnHS22X+ZKwRM5HVs/1eE0mRcH72dQ6ojh5MnIHc1R63MZCYoBBz12773qYuK9sVUXet9DntkxW7kEV9XN1a1VSxb2rfp4luX9ObMOSmoR/fAD4htGWwnA9ksKOxbs9U8A86Z/Klj84Ynx8C8YFVMpEU9+UhpTUXqIi+jYWFzMRCEJTolUdq/GKz1nqXtr3btsszm7weASVf4xCE9+2i1rNLiol14pWtayBKCNrkuBELjUTXwlQ74NECYnCitmwoKvopEiSV2Eznd491F88mX3RglMFheR3FhwevY/c0cb4b0NZus0gOTt4RWSZWgda+rzpZXwDexblR5xiT3fwmJlRwSsnyAsHyvoXykIVIFFYlxYSHwaqX06urC1T/7gVw3zhIFwCSkZaDHeDV1DeX89BSJYMTmEipcShlII7YZ++jFJI8wrM5KXj6KlNNXtmyf7X4FiiBoz+zeAAeUkO/xNGnqhWnQVVY2cOMl4NREIJY8UXdVh9tAvXTh2yIhZll+Yc1gA7h5bkxWaNSTZXUqllXMbWDGzEpumpheYbYoR3GNMOmcUJuv+aNMlpYo3Pgb0eZgnJEwzZEH7zuAimnL2rSc= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:BY1PR0701MB1723; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0701MB1723; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 4:O1OOy0ZPV4pgY2w/7a0d5B299/5kuiiGC6DZbs5FJJ7ovQ2fq+4LMmg6VoN2wJczjKVxhcb0S35ML7JbHOi1gAfxoMKMXOcNxScCFnb+9gmCc6S2j3DQv1y9xXSgjeDKv8m0dXlvuMiHP9ttNu91mvhM9AjqSQ4TZibxFth3Nu4U8rzeVWDxRxLG7jXDF+YOCTAjl0lWewju5EOeZbzwiW1s6Jw15K2SwPq7Ly8pdZ2r2lnQb5eOblEh1gi5b0ywbAULBhyb0eHFwb4/MPthWSdTCjhVWkJFh77DEfvmClB56i59DK0VKjT/Npzp2A4C4MgzaOQs0p43QAwTUDcu6hVd1FL6p9644anMW2GSV5tO9tXOme1pRphQDnycXXYP X-Forefront-PRVS: 083691450C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(6009001)(50226001)(5008740100001)(122386002)(40100003)(1096002)(3470700001)(92566002)(33646002)(3846002)(586003)(48376002)(4326007)(6116002)(42186005)(2906002)(76176999)(19580405001)(107886002)(19580395003)(4001430100002)(110136002)(36756003)(47776003)(2351001)(87976001)(50466002)(5001960100002)(5003940100001)(189998001)(229853001)(2950100001)(77096005)(66066001)(5004730100002)(50986999)(86362001)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1723; H:localhost.localdomain.localdomain; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0701MB1723; 23:qh/cnfFEzAgkM/zZFW9SX49vY6Nz75z9CPJ1MeO?= =?us-ascii?Q?73ST9HxV6K6k6rIfmYI3TGFi+XjNSvtR5DDQLeUvcZSQaq/UVtYqHR5qENlp?= =?us-ascii?Q?h12tqqW6LgTxxWx5shOu/Sf4uFv6atkwvNNN1VtTWtwqwa5ClwCGz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keyZfmVd/pgPbOihZZYznNMIndvzRoZ17ozVGC?= =?us-ascii?Q?1SV0YRIY=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 5:uEzN3gfyHIL3HT6jlknSXf/7MIXcCchCuE+NcrGh1iZrDUbLTHSysHtqLmatI4nJ0jXn6himzY93kUwAnsmG1Q6Q1uwjgSHLr+hxEX/UTGT0P394v+gPvWw5w7uAd2tU3jO9SX/rujhAmURPVnNYlw==; 24:pBOWvdPi/nFh68yKtg4b++S3aBuCss/++uZu1FpHW1xhltQbHvfogcOx6PO/jRB0mMEt5n3KMuv7a7nX0ODfRYzcqGdmqU7/0oxckLm3xts= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2016 07:46:38.3960 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1723 Cc: viktorin@rehivetech.com Subject: [dpdk-dev] [PATCH v4 3/4] bitmap: optimize for 128-bytes cache line targets 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: Fri, 29 Jan 2016 07:46:42 -0000 existing rte_bitmap library implementation optimally configured to run on 64-bytes cache line, extending to 128-bytes cache line targets. Signed-off-by: Jerin Jacob --- lib/librte_sched/rte_bitmap.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/librte_sched/rte_bitmap.h b/lib/librte_sched/rte_bitmap.h index 3d911e4..03f332f 100644 --- a/lib/librte_sched/rte_bitmap.h +++ b/lib/librte_sched/rte_bitmap.h @@ -45,11 +45,11 @@ extern "C" { * The bitmap component provides a mechanism to manage large arrays of bits * through bit get/set/clear and bit array scan operations. * - * The bitmap scan operation is optimized for 64-bit CPUs using 64-byte cache + * The bitmap scan operation is optimized for 64-bit CPUs using 64/128 byte cache * lines. The bitmap is hierarchically organized using two arrays (array1 and * array2), with each bit in array1 being associated with a full cache line - * (512 bits) of bitmap bits, which are stored in array2: the bit in array1 is - * set only when there is at least one bit set within its associated array2 + * (512/1024 bits) of bitmap bits, which are stored in array2: the bit in array1 + * is set only when there is at least one bit set within its associated array2 * bits, otherwise the bit in array1 is cleared. The read and write operations * for array1 and array2 are always done in slabs of 64 bits. * @@ -81,11 +81,11 @@ extern "C" { /* Cache line (CL) */ #define RTE_BITMAP_CL_BIT_SIZE (RTE_CACHE_LINE_SIZE * 8) -#define RTE_BITMAP_CL_BIT_SIZE_LOG2 9 +#define RTE_BITMAP_CL_BIT_SIZE_LOG2 (RTE_CACHE_LINE_SIZE_LOG2 + 3) #define RTE_BITMAP_CL_BIT_MASK (RTE_BITMAP_CL_BIT_SIZE - 1) #define RTE_BITMAP_CL_SLAB_SIZE (RTE_BITMAP_CL_BIT_SIZE / RTE_BITMAP_SLAB_BIT_SIZE) -#define RTE_BITMAP_CL_SLAB_SIZE_LOG2 3 +#define RTE_BITMAP_CL_SLAB_SIZE_LOG2 (RTE_BITMAP_CL_BIT_SIZE_LOG2 - RTE_BITMAP_SLAB_BIT_SIZE_LOG2) #define RTE_BITMAP_CL_SLAB_MASK (RTE_BITMAP_CL_SLAB_SIZE - 1) /** Bitmap data structure */ -- 2.1.0