From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0081.outbound.protection.outlook.com [207.46.100.81]) by dpdk.org (Postfix) with ESMTP id 948A68E7F for ; Thu, 10 Dec 2015 17:37:16 +0100 (CET) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@caviumnetworks.com; Received: from localhost.localdomain.localdomain (122.166.129.221) by BLUPR0701MB1715.namprd07.prod.outlook.com (10.163.85.141) with Microsoft SMTP Server (TLS) id 15.1.337.19; Thu, 10 Dec 2015 16:37:12 +0000 From: Jerin Jacob To: Date: Thu, 10 Dec 2015 22:06:17 +0530 Message-ID: <1449765378-29563-4-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1449765378-29563-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1449417564-29600-1-git-send-email-jerin.jacob@caviumnetworks.com> <1449765378-29563-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [122.166.129.221] X-ClientProxiedBy: MAXPR01CA0058.INDPRD01.PROD.OUTLOOK.COM (25.164.146.158) To BLUPR0701MB1715.namprd07.prod.outlook.com (25.163.85.141) X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1715; 2:DBqq4fDlHRswSEPP91A3aoSaz2qfkJSwpViRK5fQe/d916aE7doiV8PNy+X/WOBcQw6HKZ2zoQnhf7qxWkaJKI52ScckC6yWOC3Hv8ZrmieKvrA5nH63VuKts/3UFcS9lfoV35722g3CdOZQ32Qykw==; 3:75/H7PDPlUEDmICt/MatCnTEgV7EmFFdpCve247D9q7VQVMot6lPPxMSGe5CBCoOT3BfqViRTEeDuCzWVkLoqPLE4u5aRlgoxirSDLkczQJ/KfZdtvZ2K4z1S82RnUE5; 25:Hwz3rUcvHMBx4Glh/FFjzT3YWH6BRuQW52GuqV+78llZ5jCjMGkwBbyv4cJ0ebCqOcTQ+7yk2mNCBE5I+DPmdze50DHHDN04d6YJqvUTITi4ar9k8IQFywfZR2rGAmXJCA7djWpV8q6f7ERD9LZGAoXnLKYvC3w2WtwnV90aA0UnC3rSYt6CkRZiG7rLeBbIyH/voqc/mR5GZDvqgato9wjC23fGcSTyJxjNdxqy6f7IKdQpPzUrEL84mjbbQnAKoLxts9jZH7qKBAZ0nkt/GA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0701MB1715; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1715; 20:VCH7K5DhDCBC3PUI5CaritbEnYSUTwZfr3qZT5V61UGjVaCCobIBscz2tJw48VK23FtBOLPCm3L1G4yl485PEfgPzNEfeNSt4mZTS5ssKYN6TrvV74+lwQEbbFe/elvCCk387aIripOyodiOjJf8sI+qC/QA2KwT0VS/BdIklyW+ATeW0WcgbOmoKF/FIWjjFIjls/7Q1b1WLczPiMEPLSImqs3SYRSpkxmZKhoHvDtPjwfvY3IhWAefF8wWRdm2kS3CHceeXR5PgkYLIeFM9fV/XT8+We8nH9sQck8ezMY8Xqs3XL2wphdU+Qa3Ld7EEDgNOOcvmdNzbk/VgnUHOITBHudDGwiB2PXSHzvB8bysM/7VE5T4VE+qecEdCip6hSQOZ7KNbTAIdkws6uTdeaZT5zZj52KLAW7fMjcHWjCnP98QE2fiy2qj8FaaLCaS/XSkJkVMxe37ziOwrhFqt3UM+L8r4MAUIG82QlY/DM9124CmQY+RuC9J8TLGSQ6R9MMyt6kJLoTCv8m+sVT0kItNnUxNTfR3hq5WC2Jb2aHuA8AFdI0kguZGwGLwQ/DhgYmlE0CZy0MtL7TPLQtPQ1m2HOI6JDj5NPjSVtyiTN0= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236414709691187); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(8121501046)(5005006)(10201501046)(3002001); SRVR:BLUPR0701MB1715; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1715; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1715; 4:Hk2tw4OxNtgLVCOFWC2mu5cH2WECnhbVt8wGwUZ+m9/d+DA6dyrTNvE8GBlsPKZgWqeeaZKI5Eg3IEJIs15Fr3oqtrUztkQAALgx+PO9+Xez3O6L2Ly52M4Md4vcJSQe1zVsj4oujLapvWuIbpe6oWA++h2dw3KKFjz8U/sLMh0e+vnKg50oDtR1FCcqmdCAH5XF9vRUVHw+5FhgY9MjbLnpLxPiB1efz7UK9Z3guLRdKdbFkr9D/o7cEoMa9DIEkrsXU7OWkTIpITlcOaXlPTeVSVnkqE7gvdJOEkK86jrk658bhHOX0dZ68t4LyMBWY23PojBe08zJVkZLEYTbROgMr+x1LImkEhZEWkSAovdQ7TD2TVt37hpglKGGcpJLMc/O+Ls6ABKLqR5YdfRbbkyHFAqKhVNQC963d59a9hebCyR8ybBi3fAboCtCCGIA X-Forefront-PRVS: 078693968A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(6069001)(189002)(199003)(97736004)(229853001)(5004730100002)(40100003)(586003)(5003940100001)(1096002)(105586002)(6116002)(5008740100001)(2950100001)(3846002)(4001430100002)(36756003)(189998001)(106356001)(86362001)(122386002)(107886002)(77096005)(92566002)(42186005)(2351001)(33646002)(48376002)(50226001)(66066001)(81156007)(76176999)(47776003)(5001960100002)(19580395003)(50986999)(19580405001)(110136002)(101416001)(87976001)(50466002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1715; 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; BLUPR0701MB1715; 23:UXPHLQeY7I8VHTpYSnHIEGwvtg78mKYrgb21TDa?= =?us-ascii?Q?vcvWh8yo8zYDjIYXN2iU7hHBg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z/tdcsirlApbh0w8uSDnwlW/SvCV0ZglNLicrzTQWLvWWH0W+15qU/kEj?= =?us-ascii?Q?oLHRbRlXJ5MetX1n4cMqP0/tj9OFNs3Rjy6N6fTTpT+W7xQHMEihCTuZvLTF?= =?us-ascii?Q?2fspw2i6jF7FbjOkUClZ4QUCyHL0/tPTGvCScqsjN7k4tdV9EJ5gPUIwRtFE?= =?us-ascii?Q?44BN0CJ4hlsw=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1715; 5:qrwaNtlsOmaF8AtzcgNc8vWOe3k8k+SyAwGpCyJFAnLINwoiCGspb2aRtJX5696+xNkTGmSdoi+dAvwRchVGcozQLbDVZr1pP90aRKVToDq9SvQ8kjDXv/e9CCt6Px8qRrbdSeI7StZS80AGxuTXYA==; 24:KyczIc25iFnfdGJoqG4wJEhpUxpI37952/XdBCfMeppUcwMqjkbqXdGWZsF+tsU8ahtXyZIqc8vwi5gU0DtvKB6/wR2wxZumAAhiovhTr4Y= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Dec 2015 16:37:12.5463 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1715 Subject: [dpdk-dev] [PATCH v2 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: Thu, 10 Dec 2015 16:37:17 -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