From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DA0B8A04FF; Tue, 24 May 2022 15:49:10 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CB61240140; Tue, 24 May 2022 15:49:10 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60065.outbound.protection.outlook.com [40.107.6.65]) by mails.dpdk.org (Postfix) with ESMTP id BC576400D6 for ; Tue, 24 May 2022 15:49:08 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ghG02eOlWmAF1EWNRaLPxQk0ePYdy000W2x45LeJYzblw6cdTISrGIrC5UowE1jxdT3TvWuKZRLY4ICPPrkrDPYyQMkv1jzu8OdcCZz7r+7dpMnyUf5XbcPzVM0jjDfCJ2uvkaUWbGlTc30naTvZxiIR7jhnNR5zP9csofhGK7j6ZeVz/xyYua6QV4PE8cA/QIjlkLiECGPZbAPMvXPcL+IryF5BGqS7fswpu0O2gc/eJQpz8XSZO998OOMABbBsQSydTX7idVvjsBXsku1GzAqaZwcBuZnF5nzGYHsXjIjUL3PpsFSCgn3GNS3/JAwJBumGdMfxvaRU3YxwOyLlhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ooaEx3RV1BsJb+caFHVS7AeECa5bFN0mUpqEHKNhFDk=; b=O/lh8gJH5ECK768U53MezNVSCGUUoBZyu0NiVTEtk8JI72JwdO11v/+XFXSy75XINPvNio+fIrvF6q1cloOwNrm8HLgaA7M913wIZbtFZobm3J52BxbZM7Gp/oY3D5EtcLrG38e/6HqyZfYjf/XapIk8ATXlfpcQ2moM2B4igm491R7ywv4CKifvWa6fvOAQPTjnXXAXQUsezKiyL9GfjE8G5VEZo28jVy02Or3Qg2+2mq7R6I9TVn6gtBnAVlTQ9Xk8GsUIoQJ7DMqStvw0Gp0uylnLtBQfGqZNT6b8rfb7mAm/AvoEU+YAcMCLMnNmstrSA8fns1cDaNeevH6jjg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=xsightlabs.com; dmarc=pass action=none header.from=xsightlabs.com; dkim=pass header.d=xsightlabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xsightlabs.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ooaEx3RV1BsJb+caFHVS7AeECa5bFN0mUpqEHKNhFDk=; b=GRbsr6KKdJpCTyvRnA50N4ZJo/hf9Ck9Ih7LORMLtmVM6QVGYsZkxkWpNtJ3HTT09PanCFJJ1Te84SZ4jUimtu5QZi9l6Rwxuql6P7uboiZFvfeLch5Bio2BIuIDzcB4fEAqteIOj56ugDwbryw7Y+14wwUgRM9mmhKh6REjh+U= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=xsightlabs.com; Received: from DB9P193MB1482.EURP193.PROD.OUTLOOK.COM (2603:10a6:10:2a6::7) by GV1P193MB2181.EURP193.PROD.OUTLOOK.COM (2603:10a6:150:2d::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.17; Tue, 24 May 2022 13:49:07 +0000 Received: from DB9P193MB1482.EURP193.PROD.OUTLOOK.COM ([fe80::3c11:328c:a5e5:7253]) by DB9P193MB1482.EURP193.PROD.OUTLOOK.COM ([fe80::3c11:328c:a5e5:7253%5]) with mapi id 15.20.5273.023; Tue, 24 May 2022 13:49:06 +0000 Message-ID: <2617bf23-4aca-e77c-b298-ae00cf83298e@xsightlabs.com> Date: Tue, 24 May 2022 09:48:58 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH v4] eal: allow worker lcore stacks to be allocated from hugepage memory To: Kathleen Capella , "dev@dpdk.org" Cc: "stephen@networkplumber.org" , "fengchengwen@huawei.com" , "mb@smartsharesystems.com" , "anatoly.burakov@intel.com" , "dmitry.kozliuk@gmail.com" , "bruce.richardson@intel.com" , Honnappa Nagarahalli , nd , "haiyue.wang@intel.com" References: <20220502141058.12707-1-donw@xsightlabs.com> <20220517153136.23128-1-donw@xsightlabs.com> From: Don Wallwork In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: VI1PR08CA0234.eurprd08.prod.outlook.com (2603:10a6:802:15::43) To DB9P193MB1482.EURP193.PROD.OUTLOOK.COM (2603:10a6:10:2a6::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 27c92bc5-e5a9-46ce-b458-08da3d8c2afe X-MS-TrafficTypeDiagnostic: GV1P193MB2181:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: S02BlAm/KyS12asoxbZh4E4ceLxli1tkwbuk9e08BDhBDuROVWveJEWvcDtWxZInqKhEHHricRKuh0nVcTuy1pDcOffYpUnUtO4Cr6eLJL3u+Fdy5113wbsWcBFm97yr48Q4Ix357hIb+oF2PmuWm18x80s5RgymTh11j/SAb+YSsZphOD/vyj46Tf9D/3KDw7iIpya8qrr0U8pkPvtNbP1Lg43udtFrWz81OZTU4uh4JA4FSwLHwt3KbtrPGCEBipGR8uLRrfTvKpGloo/vrDT60jV0/6Y1errr5FegzuJfJbgezmlqUARsKl2v3gpILSa5zBUi2aQ54FCnT1rC31h0R+IDt6fM1pkRXGSUiXDPQ0H8aWd+CKCd2muiJK0uQWyLRPP0whDsNFTEUuLMb3D70DWzAojI5cjg6yjRuI7gd7EKR1KyQUQBKozSAIaFFYqiYGWp6+LpSx52sr0fEIN7svFfXVrA8ZhcGB5x501vF9PZOglE3tv1PafLgDPezfEYyZgjps+AIIEMSar4w/B6y+NZFPUD7g0NpKNYBLDtJmByOAJtGIUq/I0caMaxT1OUIBLP9Arq89oEF/0/ebAv3+3/A9uC/YFC0EzaFcKy4SeedhrViN/kVY4VV9tY+VYVoua6l+sh+tYhIiV7cFSEUa6MvAn5++3BaDU4L64094jVXsbwSzSkMNdotqw89NLyOlafuKhNvwyflyagoBX9Ideh1eDP9lbTVmRMQ4IKr6EcWca5nL46r2iD95XzEkASG+7T+yq4TS3ksfSVLA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB9P193MB1482.EURP193.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(6486002)(52116002)(7416002)(4744005)(83380400001)(53546011)(5660300002)(2906002)(508600001)(36756003)(186003)(31686004)(6512007)(2616005)(26005)(6506007)(6666004)(38100700002)(8936002)(8676002)(110136005)(66556008)(54906003)(4326008)(316002)(38350700002)(66476007)(66946007)(86362001)(31696002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cEdZMmx0NzdOWWNCTFFlRmhwMUVoeWxxdU1PU0FWV0JSZXRveHpWM2ZJMThw?= =?utf-8?B?UnpibkxIeFdNRGNYaUR6TWlIcXU4VzlWRXU4QWVQRGFFWi91cGhFNkg4d3pN?= =?utf-8?B?eTgwbmRNQ2RwRXJqU0tsZVRTOVNLaExzRU5LMkg4M0xic0FaQXZnUXFBVEFp?= =?utf-8?B?OHphSThjblRadHM1MFQ4Mlpo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dVdzV3MxUlNCdkdhMUFk?= =?utf-8?B?dTdJbTZ5K21wbEpiNk9YNnpwMFNjVnI1UVJ4akVCYlRKOHRyWEM3WXR0MVJm?= =?utf-8?B?ZlVpSFo5MDRMUm1sUnlpM2lwK2hQdGVQQmJHMWJhV3BIREVzY3krSTlsZ1px?= =?utf-8?B?eFIwRmJ6SFdrcjU4Y01zWjR3U2EyTjhHU1NJR2FwUkdmMUxKYmZ4OE80R1By?= =?utf-8?B?UUlyQjhJWHZEdnRKV3daMXgrbEhCV1UxdngycnloVkp3SFYxb0E3elpmbStU?= =?utf-8?B?T0lpSWFLbTVhMHBZaDRMRmR4bDRxRllrNGNJRlBUNVlRZERxM2NtbGNXSnVl?= =?utf-8?B?UUJYUVg2RGpTeTc0c2xNSTVjRWxyWHJXTXpxbDcvaG10SFFsMkVQQT09?= X-OriginatorOrg: xsightlabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 27c92bc5-e5a9-46ce-b458-08da3d8c2afe X-MS-Exchange-CrossTenant-AuthSource: DB9P193MB1482.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2022 13:49:06.8032 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 646a3e34-83ea-4273-9177-ab01923abaa9 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 7UwwIw9Yxath2ObID/SGWqQN/aLJnN7p4KwEGRGAkQyjslmxdOgjU4FHXEsbF5oyx4C6EGufHvEl5iyCgfcB4w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1P193MB2181 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 5/23/2022 6:35 PM, Kathleen Capella wrote: > In this section of the code: > > stack_ptr = rte_zmalloc_socket("lcore_stack", > stack_size, > stack_size, > rte_lcore_to_socket_id(lcore_id)); > > stack memory is aligned to the stack_size. According to the implementation of rte_zmalloc_socket, the alignment must be a power of two. If the user inputs a number of KBs that is not a power of two, this will fail with a generic error message of " EAL: Cannot allocate worker lcore stack memory." A check for this occurrence with a more descriptive error message and a note in the documentation would be good to include. Good point.  Alignment to stack size is not necessary.  I'll post a new version that only requires cache line alignment.