From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0079.outbound.protection.outlook.com [65.55.169.79]) by dpdk.org (Postfix) with ESMTP id 02F008E93 for ; Mon, 14 Dec 2015 05:33:53 +0100 (CET) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@caviumnetworks.com; Received: from localhost.localdomain.localdomain (122.167.202.21) by BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) with Microsoft SMTP Server (TLS) id 15.1.337.19; Mon, 14 Dec 2015 04:33:49 +0000 From: Jerin Jacob To: Date: Mon, 14 Dec 2015 10:02:55 +0530 Message-ID: <1450067576-18803-4-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1450067576-18803-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1449765378-29563-1-git-send-email-jerin.jacob@caviumnetworks.com> <1450067576-18803-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [122.167.202.21] X-ClientProxiedBy: MA1PR01CA0009.INDPRD01.PROD.OUTLOOK.COM (25.164.117.16) To BLUPR0701MB1714.namprd07.prod.outlook.com (25.163.85.140) X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 2:V4wsy7nlpn9qqgSy7W54DcKIwoRo2o8VBNch6H0pDX+UzT6ATgnxpu0jaKeUT90pDabd72sNBgT771Y2TRmG0Lo8/H1+6UYnGhN2qMAvwEROtiP4Pt3Dcp6x8N9AfdfFy4796OAfKwEzrGZHIyc4tw==; 3:grYjg5DO5aqeuRuV2oHzQ/4BNN2KdGEjn7q2u67RDsXrfGaPoL1c+ZnPS7J8axsZjGQqhdxIJth3BiF+cc/guVmpOwniXLAp6lSAeML0HmG8fM6OQelZwi7ZOraNjx75; 25:axp0jBeX/oIOW38nPQltF4GzXauPVNA7T40CgAJVZPOUPgUD4UbvNcrVG+QvaYeQxudEiKHBO8zBjxi0Wp1o/3zqesABAjinlnhQtEzkEjtnYbVcSq91o64wygcphKskUMEJyXB3pZvIvP96Re7SgfEQqZdHB4VA4QPxFl8V6WGWU1WZQ/BGTaPJr3KaLb2pAqwtK1U8chOdOTzoVBkXu/uPp348EYCAObkCcabwDwOb2+cPh0kk1wP/3KXQU1kUie5XnsyFmAwWTyXaHvtDOA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 20:H9tSKEi4ooWjDEYOP5N7Zp8ioA6fDhI+ri9tdD6qSMBL0s2McArgLlhT3O7urIJr13ceMQvPM17ZLGVGrZkWG9JTOTsKQ70GPtb0D1Q97DV1kVAj9i9EISt6vzdVyVjJPOyY5U+UM+GKoqgP+d0yNMdYdORIGE4OQ1IJbc+XZjM0jXLBGOffaih4fGx/3ChhzoyWJ8DHQIrXM4vWhHSUbK6lumndSzMQeHLjwVQGF2wdMzsaBJxxVWDlwXNf5PlSu5P4ldGQXUDRIa90ZK70TQSCN97wiIMS2Vev4TtZFDZCTekB8/ymUfKHV14uB9YiftV34LWlDEf6rHk9IQJTqUTCVBtbsBq1XCL1ZEGGqdaYyvtXpaml7E9aOLxthN45L2rdjA9WdUxisenNK4IeTSJBAqi7kofaf9kYlNdydB6y0wIZoJFNnkEdyTXuYQ9cBd8TScnEhRakcY/saI9YKylyT5ZaFgdU0e1pMzl24yGdDcyHeBJlN90uITmynIbv3x9vG4GN4BaYtTknB0xYmtDCg/TFRT7S/KP9Xczlkv0ZJjgn8fleT0AgF09HNDtpqyqMAJAvGn+YablwZ/TY/IahiQU7sCsDfcvNdqC3wXM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236414709691187); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(3002001)(10201501046); SRVR:BLUPR0701MB1714; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 4:MdmUDu6LszT7PUUFS4Ukusdk70/BJ9cRzihKQdeItb4LDTiICmqidd3TMMyiSLBVb0YwqBUwaV76eLZwQtVSh5/RmAClnHOljxJg5hBAyXWw4tpq5SiyRbfdpxL+lPbnDh18m+LMQz8vvYA8Ax/+zzUb/jfQ43jyQxf5bqs3FDjOfPZuBhpq/sXzfy+4W2mjHBee4pJXfzoxTsCkD6tCpCtQV/XHezqcDha5044b4NsAHjMY8eLW6lIdy2RkQD5LZG/H/cI7nIB49BgLz2Ba9DwNsdjpbUJW3G/02GBFkSyx8bjcCF+OSD8BYb2zMbadOFBE9JoLKxDVu4/EbaYK/j0WbFGQ5EjR1p53UMr6rNPsWDiLKbp3mKZHjvNMlKeQ0BzPW8fTO2PgvaQ6dTqqY9cnywDqte9jWJG9LckR9xU0VNJDzPaoiFqin64zZOgR X-Forefront-PRVS: 0790FB1F33 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(6009001)(189002)(199003)(48376002)(19580395003)(42186005)(77096005)(50466002)(1096002)(50226001)(66066001)(47776003)(2950100001)(5001960100002)(5004730100002)(36756003)(189998001)(101416001)(5008740100001)(4001430100002)(110136002)(6116002)(586003)(3846002)(107886002)(106356001)(105586002)(40100003)(19580405001)(33646002)(5003940100001)(87976001)(229853001)(122386002)(76176999)(81156007)(97736004)(92566002)(50986999)(86362001)(2351001)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1714; H:localhost.localdomain.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: caviumnetworks.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1714; 23:U0+lGB0XE8oorsOZ8qxmWM/Jm5WziuMkpWIHZsv?= =?us-ascii?Q?fSdDHhaAZk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GdiTn2/?= =?us-ascii?Q?mxSK/ku82/2KgRsj1jgmWwWNfQANbA+E7VZx796D+8n+HVD9paECR0gHorLY?= =?us-ascii?Q?0kESIRThNhbhbwHuZKJZCJRKBeuH9anApbfLBqtieHWNFb1MpSE4IiEkxcDt?= =?us-ascii?Q?NGxQcHgmAJdDO7zmgzaVSMWS1ZNVsW5/sc9OSWzwH7kvp6u+M8V6oDJ9FI9x?= =?us-ascii?Q?jfO7tKWlJ/NFJiU+pGU24TEwA2/aMBY8a?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 5:FNotYJgg0mFV4M5Yd07a0ZcavFpV4JYzvhTGjNpTfd6OuoJw7T8WNtSsqe25y2bofPKIYgBokn1VGAIXxiGKGFtwSxRk0XCn1unFlWi3QCKUXsnXkb5At46ojkhgvZiIcXxmJCkSDLwT6yog09UDDw==; 24:qLBm8C61Gx5WQTX/IWo4phWWaGlHZq5TqOJdkDFSE+V4t6F5FBquVSd1euIujhLZKfNY1LEZ88a35p7Nf+3MxsK3H1xjqArqJer91THv9b4= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Dec 2015 04:33:49.4999 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1714 Subject: [dpdk-dev] [PATCH v3 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: Mon, 14 Dec 2015 04:33:53 -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