From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from emea01-am1-obe.outbound.protection.outlook.com (mail-am1on0085.outbound.protection.outlook.com [157.56.112.85]) by dpdk.org (Postfix) with ESMTP id A98CC106B for ; Tue, 7 Jul 2015 11:16:02 +0200 (CEST) Received: from DB5PR02MB0807.eurprd02.prod.outlook.com (10.161.243.153) by DB5PR02MB1238.eurprd02.prod.outlook.com (10.162.163.144) with Microsoft SMTP Server (TLS) id 15.1.201.16; Tue, 7 Jul 2015 09:16:00 +0000 Authentication-Results: intel.com; dkim=none (message not signed) header.d=none; Received: from zhigangTHINK (124.207.145.166) by DB5PR02MB0807.eurprd02.prod.outlook.com (10.161.243.153) with Microsoft SMTP Server (TLS) id 15.1.207.19; Tue, 7 Jul 2015 09:15:58 +0000 From: Tony Lu To: 'Bruce Richardson' References: <1436172698-21749-1-git-send-email-zlu@ezchip.com> <1436172698-21749-9-git-send-email-zlu@ezchip.com> <20150706153758.GD3680@bricha3-MOBL3> In-Reply-To: <20150706153758.GD3680@bricha3-MOBL3> Date: Tue, 7 Jul 2015 17:15:41 +0800 Message-ID: <000f01d0b895$8ccbf8c0$a663ea40$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AdC4AcObp980hjxAQB6qCcHmiJ+LMAAizDDQ Content-Language: zh-cn X-Originating-IP: [124.207.145.166] X-ClientProxiedBy: BY2PR07CA068.namprd07.prod.outlook.com (10.141.251.43) To DB5PR02MB0807.eurprd02.prod.outlook.com (25.161.243.153) X-Microsoft-Exchange-Diagnostics: 1; DB5PR02MB0807; 2:tB7Gescz0c8CRPAkfH6TdVKq5o27Ho0I6dR56pOj+Hj7Auq+Fs6zqxs0ZV7pqzRF; 3:BQH9BO7FG/OMnzLILqDS6QaCbZArCYv0B8oYkWAGhEAlqqEcuaB6FNHu5yviQTAboMU6vu0guuLfQlB4f0goxtbNpg/blrg8/yKx7lSKjt7m+PpDSZ2p3APVimvnwhM7U+vNzst7bGE1ZbxwU4DHcQ==; 25:Tj+qhTkfjvWjdOfqo6g2MGIDcO6ol0elAp7o4GYBErjCfA52TQrMhfW80BaYJe3P7VvEsnMfLM7xct+fDP5epaqbYx9D40lOiWcjy8ZaPVcYibRehJcWDxrF14VgdNBAGy2+6SP2VaRJuBhyKFJpmYOuyA/drr+RlTnSx3YI5/ISOD392x8ZszTQK4lM1zbqj+RWh/ldQb5E7/uoTmujw9p29UAL4k1lEFcTiHSzG5GqLKfD3kREIYViu9Hrp6+kxai8SQ746NDX4F+/CaaFFw==; 20:+/gP+UvwIJ8MJCIkaHDkGgQPAG30BXu9EyGPCXFbLjC/eP90iRtJHrnjzlz4iADAjojfyCEqCg1dLqN8D5f5t1HIKYLbdQSBb2mAUn9tC+nX2xPwgj5KEG7/Ud4WGmQE2GbnVQbBJJgQ1sivGMUhc2OR+M4N/I1rn1r7rs6haoo= X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:; SRVR:DB5PR02MB0807; UriScan:; BCL:0; PCL:0; RULEID:; SRVR:DB5PR02MB1238; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:DB5PR02MB0807; BCL:0; PCL:0; RULEID:; SRVR:DB5PR02MB0807; X-Microsoft-Exchange-Diagnostics: 1; DB5PR02MB0807; 4:RKPrkIDzcKzYDl1uTu3eEzrdQyFSoD57m1JzGgz38BR7wgxA/MEtzpYN/rtXHq8P7f20z2Be0YHdSrptVWE81bE4Bx5N+Xxk5aVuVvNYNa3TdhSv9iHwVnjF0oEjrw7Kziix73ioHp+tr2NYYvXof7iP7n/61rpFScpyytdL8/6smYkDE3pB+RqT6bpBxmAeSx31p1pkpfix1MIj5QXUXycTZv0FPLDlZ2UUq2/OEAIxhxxYfmZLwypj1vOsvnJJCgW6iWEJ0nMrMDNJ+GiVzgmldnsOOtjZ1lSQOEFzZS0= X-Forefront-PRVS: 0630013541 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(43784003)(13464003)(24454002)(377454003)(51704005)(122386002)(92566002)(50226001)(84116002)(77096005)(97756001)(46406003)(59696002)(50986999)(33716001)(575784001)(33646002)(77156002)(19580405001)(87976001)(189998001)(61296003)(76176999)(5001960100002)(102836002)(23726002)(62966003)(40100003)(19580395003)(66066001)(50466002)(46102003)(5001920100001)(2950100001)(14726001)(96836002)(110136002)(42186005)(86362001)(47776003)(2656002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR02MB0807; H:zhigangTHINK; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB5PR02MB0807; 23:ahHfoxYko6B+W8GMi5n+K9hHXhMd8h/EAESdwQD4y?= =?us-ascii?Q?Wx3hlYvlcgDyR0zZKbgr6MSknDAcRxin3bo/0ltjnxENWKi2J0NQPxxz3iqL?= =?us-ascii?Q?SeH57FO+KX3paNd85Eko0UhBXglbirwQvg0ZIu8l2eUPVCJMnU9UqMLeAxHp?= =?us-ascii?Q?Yi0tNmNJRs57Qpz+yqJLnnSvXinL7erxOKWW5LXoX2o4O0bl24M8TlcP9u3D?= =?us-ascii?Q?+1m1XyR7K/4U8cY7W8G/UQcIIL+avNTgvtOD6WQUCxI/KAQvfo5ZW+NV5DUI?= =?us-ascii?Q?0keO66gfYMpQcMdRvUgVbpxw4mhigO9xQWXrmFAJzmE7tM4N6smqoRTcSohQ?= =?us-ascii?Q?QI6rV0MIdE9wdvkbS3EOBjiGwzqDHHHuDWPttFdwd2i5Samed53nMh5wGo+Z?= =?us-ascii?Q?n8OQwLnINUEpIcvFLgcoSqrQj7oYUO5p6hhEHaclnkj7dwaW2Ow4SLkcSy8o?= =?us-ascii?Q?BA7t9ZKxzGUldTLByDavWKa1qblfWfca+eTxmAi1NZbzn69AUp7XCiXa6I8l?= =?us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mhQNdNKFtwoJSYJp2dErBcsLqWIxfpriiitrA== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2015 09:15:58.9850 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR02MB0807 X-Microsoft-Exchange-Diagnostics: 1; DB5PR02MB1238; 2:p5COGI3M5yqImu31cyEEbRyYis+uZtIKg4k/hxNJDRHEzZCrNcbJDj/3Dzuxl9pq; 3:1lUjZ1sdhCr9IeCJ/jI07mX+svGWIrqKWGXeu5qZ5g3gY0TClLG5778g1+WVHw5dxqp5+wCUpuBl5SwIVZ3+xBg1exlpcPRIv4FS4nQsK+ODAgRP1YYFR2ox3XV9O3nwd4jw3WV2N7j8w/SpTrrUbg==; 25:x0ceFoHnigzMOO5rvlHZWmHvD13MThY5l5G+6cIFj7QIKXEtGDLuB/j1OrBO3gAuevM/aeYJ3vZGAhM+VvQ3IfnQdU2Kaq1DddWwXDI+qzK3mqpPLs3Owre21o/YXG6KHQoRwiFsqOXPa1OJkodyYAKp3nMuLQ/UxFhgq2NJryJtHw/hztV/rjRZUa3pTOO5bXFX9dcdPKZD56wr8OgSB6R1X5ecDT2irvR6wUjlq0rg19nlXAQIRofUnuOnskmS9Rb+Fa4d+usTqVDf+dMISQ==; 23:Z/uC11+A9eQHyJ9lFj5P+V3CHBfSjfK/CQJkDkNp7QCR95htircl5SfjZEtG1BeFhI1pVwXWC3wkH9fojMfdCcrQ4TwTvFs8KNpKgZ3h36GNYK4Nvdc91ceH5WfxuzisC7IcLJZA5uiT4+YHjB3aOMCPklN0qVxjdMARQwoWy32ChdThSDXR2u/dNzldXRDcQsWEMPwfXC8dI2KsOgEZdgbbBElzNz/kSJHeCDNamWJnc5PtQ1Gg6WPwrCTUA/gG X-OriginatorOrg: ezchip.com Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v3 08/12] mempool: allow config override on element alignment 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, 07 Jul 2015 09:16:03 -0000 >-----Original Message----- >From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson >Sent: Monday, July 06, 2015 11:38 PM >To: Zhigang Lu >Cc: dev@dpdk.org >Subject: Re: [dpdk-dev] [PATCH v3 08/12] mempool: allow config override on >element alignment > >On Mon, Jul 06, 2015 at 04:51:33PM +0800, Zhigang Lu wrote: >> On TILE-Gx and TILE-Mx platforms, the buffers fed into the hardware >> buffer manager require a 128-byte alignment. With this change, we >> allow configuration based override of the element alignment, and >> default to RTE_CACHE_LINE_SIZE if left unspecified. >> >> Change-Id: I9cd789d92b0bc9c8f44a633de59bb04d45d927a7 >> Signed-off-by: Zhigang Lu > >This looks an OK change. However, would it be worthwhile making this a runtime >parameter rather than a compile-time one? Is it likely that we will ever have a >case where someone wants two mempools with different alignments (and >where using the larger of the two would be problematic)? For now, I don't think it is very much worthwhile making this a runtime parameter, since doing so requires changing the mempool library API, and also the users of mempool do not quite care about the underlying alignments. Currently, the alignment for mempool objects is mostly a hardware requirement (currently RTE_CACHE_LINE_SIZE for good performance). And now we are defining a new RTE_MEMPOOL_ALIGN for mempool alignment requirement for cases where someone needs other alignments than RTE_CACHE_LINE_SIZE. If someone wants two mempools with different alignments, using the larger one would not be a problem in current mempool implementation. Because even for the case where there is one alignment requirement RTE_CACHE_LINE_SIZE, we would provide larger one (2* RTE_CACHE_LINE_SIZE and larger) for allocated mempool objects, as those objects are continuous in memory. So we could not avoid larger one in current implementation. Thanks again for reviewing! -Zhigang >/Bruce