From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0045.outbound.protection.outlook.com [104.47.36.45]) by dpdk.org (Postfix) with ESMTP id 733335B34; Wed, 18 Apr 2018 19:55:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=HbOygF5nLaMAna+D50WM0bGF9MTZwYoLi7gAA8zdw30=; b=H9BHzbtDjVz1a1XAvndSgcSLUmr+r6diTl12CpxkJt2sbbbSev/RBNk/iGp4l4I28Ot3wN3XOla+3Wr9AEsqp1IX9AHQ6VeyWbFblXvOG8rWstQkDWGxw1yUGlpxpJyVGDH6GBK0AcxzSJGdFfiYR6vRdTvBY0ne87Hgnjn6tsU= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from ltp-pvn (111.93.218.67) by BN6PR07MB3457.namprd07.prod.outlook.com (2603:10b6:405:64::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.13; Wed, 18 Apr 2018 17:55:35 +0000 Date: Wed, 18 Apr 2018 23:25:06 +0530 From: Pavan Nikhilesh To: Ferruh Yigit , thomas@monjalon.net, jerin.jacob@caviumnetworks.com, techboard@dpdk.org Cc: dev@dpdk.org Message-ID: <20180418175505.GA17954@ltp-pvn> References: <20180418153035.5972-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: SG2PR02CA0018.apcprd02.prod.outlook.com (2603:1096:3:17::30) To BN6PR07MB3457.namprd07.prod.outlook.com (2603:10b6:405:64::20) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:BN6PR07MB3457; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3457; 3:3XOjCRMlB5rNGAR5TGfyCRsRX6ore/J6grx5kSz2iuCN59v9Fhd0zqhJizyMMaYt+hS0ZQvh2v5CsItpXC+xwNcnZ0Iya1ceDWm08c9Smy4im0Z6vcfGJ24HEkJFBux4n4GlNR6pDys8Dszc2nJUkiDv+JoeLX8Xpj48E4C/TxIAH/2b/YRzwk57lc3fTbfRjzjgyvt4u1n0YmXkeHgnEi3jAX7ZUawLoKO0/aqllYrxEIRuGERi++Gc0gp5EJ6R; 25:AnC2orWkKYYVGL8Pf4dvApcVwkB0W9le31YbbBmj5Y78AWy9ykbbXFd+Bgs620ssZ3ndOHjQ3YlpJc87b1lJwXAY5Cqp94TKXAQD4f2xenl3pqOKfAFPexpZT4sRHyw9o6wpm1aYmojRx20YF1LozJOnMve+7ivVtJv4anQNjW1D8cSOoA0TyzwjgW0PZZNcJjV5TkwGo9rLrAeiM3gx+xkvv2zUJdwTilVWVyFiDlGbCc5QG5UnND655H0zhFsWv0L0ayJkoHLu8G7+f4qnfWksoYWTIxis+EeX/PvH8Xl7VAYNmwvxS+PMnLHUbsFhB0n0vYobie6pgheLD8hlIw==; 31:nheyYobCWXSRk44Zg26bA9mY8fVe1QMEwvj3NBAErj0K9RIvQCAbDT6k5Xv8xEuPibbxzmc4+5oQpCCHZ5FT4Pov8LoUbXfjgA0FB/07Q0NftW71eJKl+UG8io4T9ZVJMDIVmvGkcyd6+hD8WA6SnL6f3vU31siqzkdTeylC6bT2/RICnwCU5+Uu63IgImcgPGHLHqnaqPRvqfyXDKFdoCZfSrEdmSPls1i6X/5uBeY= X-MS-TrafficTypeDiagnostic: BN6PR07MB3457: X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3457; 20:HVELLnWDK7pJoNKdnze0PViwgr7WRZSwgkQWNyA4Yvp4sm9kkFjcLBmtQRGR0WZDUY+4gz3inrHkvDvKZjlSsJJx5KfeD1METOwNLOkF+pjeiWx45GgZa8gW7+DGbZu/hwPajbV+g+YEdmMYde/eLQvrGAmQAmb6CGFLH1uCMKhAdqpT6GVcocDULTek2BbIRc1Nw7so1i3nh1OfBRvKQEZvHFE2iEj7uMbyg4cpnk8lsyTKWelKFqmm26gUgyQSQBo30l14ur4D4ZRZF6nYj/JbLg8BLlFMyVjwITyN2vlvxCbEu7DZ2uMKn5FMhLTTKsZ2CvQBUQPu6gYFYYhjx3WO8ZyrmjVLvC7RqMRq0oF807gotrObMBvEONG0obc+2onW/5hYO8MqoIcPCOOhr77XwAXHbY1xBh5gwR1JUGlRsGytUhzIH0pnlh+JE/oAw8eSlZ43grHE0EvtF6QGeMYml9ZUjlGkbSbTVsSYVSZBwDpWTJ7fvmMlttWo7Pg55kzKdbqYeAZb7xgP6KN3lF1puceHJ0Ie9MrzTLZ2P+YCTF/OeBo4BTbvR6pS2rDkgoVLsGLUGhh+mPRf5BbwEACwREe3lMf9vpxKouRGZ7g=; 4:Xkri0RJO+NLDP0+tcfk712IT9mIQF0S8px5yHOmkwrp6Dj6/d93vD3PWmCPwVOgZwdlxHIjVAovC7J8647IuRaKMH/lUXUI5iXPotmi6527QRxGofgGKnkp55gLNpHfbrYlnPwwPbfxXgsearVZ5HnNrXUXFChfuTOs3WTSWJLhGK1K+9jgqBT0aK1UqIoYZgJCLgi6qfqGkxd4O0OXab3cRWOvy+Y3ho5VNh7/KLqalukbNvMo6gV+r9dkKtEOHiUa0hD7Hnxgut8FVOtehN+0y1K2n1Ujaa4z7h6li0SAFPy+wiCw8xFH7r/gqer11 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(166708455590820); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(3231232)(944501327)(52105095)(3002001)(10201501046)(6041310)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:BN6PR07MB3457; BCL:0; PCL:0; RULEID:; SRVR:BN6PR07MB3457; X-Forefront-PRVS: 06469BCC91 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(366004)(376002)(39380400002)(346002)(446003)(11346002)(956004)(316002)(5660300001)(476003)(8936002)(966005)(26005)(4326008)(5009440100003)(42882007)(186003)(7736002)(25786009)(33716001)(81166006)(305945005)(50466002)(16526019)(8676002)(2906002)(33896004)(478600001)(53936002)(76176011)(55016002)(23726003)(386003)(53546011)(6306002)(33656002)(47776003)(6666003)(3846002)(66066001)(52116002)(6496006)(6116002)(16586007)(6246003)(72206003)(229853002)(1076002)(9686003)(18370500001)(107986001)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3457; H:ltp-pvn; FPR:; SPF:None; LANG:en; MLV:sfv; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR07MB3457; 23:X5BuPqxblkOFsgFtq1Q+G05GZYDYEVk9ti8Y5xpo8?= =?us-ascii?Q?ng1kG2YfyHYA2BHTlEmdOCH1o6mf0FyOID8PfS8BdbUgrHT8oCEPJUx4VfZT?= =?us-ascii?Q?OxH6uuJTeqUXdguFXyNRqNHEFoQhGPIwM/Gkm0+3fFhp9qoz4UyXSGJgLEdl?= =?us-ascii?Q?jtA+tRUWu9blExjaaCxKov0il6F9DvT3hN8vqQ7tybQG7F0nGkT5NLo4bSzd?= =?us-ascii?Q?Ng4hhhxsXMM82yaCIw+oCiCu5KfHHPupTJ9vecd09HSs2+2c5IS99bRvXit6?= =?us-ascii?Q?2lyMGMmIQp726np4m+Q/mR+t0Nt47MjSZN9uODsN+QiQrpBUU4Rnpvpv3G3+?= =?us-ascii?Q?M6n8uHObX+lWMn2SJBpoYcFb8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UZD876JC+mUmyQ3q2Sn1ygWCs5AIp5J5sNooB/jUckuXsikU1aojrjbWv7h6uudBkt8HHdu7ah5N5cUvMEeid5MitaaDkYKnm3aPSXUr051zGsdcmHOfYTO7njeRz8RrMyRjvlPRpPVKvU+UOuBLbAtCrYbflVDC0Z1fnV2OPerSockQ9gGs1BH X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3457; 6:tCwzXXtbJLQIgIp9Wtx4b4nVQFLkSBI4khl+F7g60gNyXeQJttjLi8/LkHBYxEumHqG/W/Y3jTQRDhh/BsMAYvXQdLylXB1b+OhfoOmu0QAHL684SRLIGsLeKheppFmuJr/H5zHb4W4b3PqAD0ZF3vJ4//Tum8z2P72RY+yAHOT4Q/UEQoHJdNp0y7CqL4hByZ3DSIztZpf31GKD1qgkyQRZiDiQs4loWlytUaAH9knfLi7WHNHezcIqK80LPKrmoRefccRCYx2tSbeoLRb41M2Wtmogin+VOhCMmzqjsgPulek8pQdNkS+Ps2YNah3dMi1DJiMSdCTrki1eZWlYdArg3Niu+qYS+Cm017iYuj5u71iO6T6UhdjjCDXeyRpSX3ACg9UBXZmHhuvHYg7qYyWLx1o5BaWSv5ygQiv/Rqa+pxNMns2ftLqfaMLvA9vzpUn1N6m2645t7vtQ3H8PvQ==; 5:mlGSLTVgsXtLxq9lURnsh/ws2+O1bZocPZO/myMy/6s1mOpnWkTek4QVGxKrDom8KUlJD8DHMt+Au+1QSMIuSndTUGWeZVYzY/0BHnT82df38PtIt5HUIT3B4ElLlAdHb5JfDLtpE7SPNJgqvXHV65xMZR3T+fH4DWnH0Wo/hWc=; 24:6glXtKRgkCOAmV+ezquVSDiy+HFr0P1f2iy/TZ4xlTnqez3zOBMPM777kZTvBGTg4BLrg2l+dguwwgQX6NuX9qEzstrY7UoaXpVB/UlLklw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3457; 7:cC7VqXU/B7kHv+Qs86UpB5FOtSD2EYXXJpq5sfqg2qOMQYfn3YdJVra9uFwou5qPQnMubeTzRoNSsS5E8xYhw7fUoyiVRcIN2FvTS8eq7d/OQeIcXXbsZHhaBN+UB5WHoC5cGhf9PALc6LjJp/pY9m253cNiH0jZzQxTok7zsMm8CPYItYaItWaHP/gMENh+ZRT9fAqnSFKNV+2auhxkupBdeqK1wtXjL6Sn8L10XVBrtsoxSRRWz7yTMYHvMFbq X-MS-Office365-Filtering-Correlation-Id: d05e9399-40c7-42a1-6ff0-08d5a55597d9 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2018 17:55:35.7559 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d05e9399-40c7-42a1-6ff0-08d5a55597d9 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3457 Subject: Re: [dpdk-dev] [PATCH 1/2] eal: add macro to mark variable mostly read only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Apr 2018 17:55:40 -0000 On Wed, Apr 18, 2018 at 06:43:11PM +0100, Ferruh Yigit wrote: > On 4/18/2018 4:30 PM, Pavan Nikhilesh wrote: > > Add macro to mark a variable to be mostly read only and place it in a > > separate section. > > > > Signed-off-by: Pavan Nikhilesh > > --- > > > > Group together mostly read only data to avoid cacheline bouncing, also > > useful for auditing purposes. > > > > lib/librte_eal/common/include/rte_common.h | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h > > index 6c5bc5a76..f2ff2e9e6 100644 > > --- a/lib/librte_eal/common/include/rte_common.h > > +++ b/lib/librte_eal/common/include/rte_common.h > > @@ -114,6 +114,11 @@ static void __attribute__((constructor(prio), used)) func(void) > > */ > > #define __rte_noinline __attribute__((noinline)) > > > > +/** > > + * Mark a variable to be mostly read only and place it in a separate section. > > + */ > > +#define __rte_read_mostly __attribute__((__section__(".read_mostly"))) > Hi Ferruh, > Hi Pavan, > > Is the section ".read_mostly" treated specially [1] or is this just for grouping > symbols together (to reduce cacheline bouncing)? The section .read_mostly is not treated specially it's just for grouping symbols. > > [1] > If this is special section, can you please point counter part in the kernel? The kernel has something similar[1] but they have a custom linker script to arrange symbols. [1] https://github.com/torvalds/linux/blob/a27fc14219f2e3c4a46ba9177b04d9b52c875532/arch/x86/include/asm/cache.h#L11 kernel commit id 54cb27a71f51d304342c79e62fd7667f2171062b > > > > + > > /*********** Macros for pointer arithmetic ********/ > > > > /** > > -- > > 2.17.0 > > >