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 A5984A0543; Tue, 24 May 2022 21:38:44 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 43D63400EF; Tue, 24 May 2022 21:38:44 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60046.outbound.protection.outlook.com [40.107.6.46]) by mails.dpdk.org (Postfix) with ESMTP id DB462400D6 for ; Tue, 24 May 2022 21:38:42 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bg15YhglyUIEkQMQOa2vVzTfOgvYpLGOW9xgZZEtTj36wu/1r5cpiGxlAYquayZP/i/yZZVAGfeYlH9vHhCkXaZTH0fNYIG4jl3s2X+GMpZvRQelnZ9nCbqki6JZifGWcOeXAAnClI2hc6PvOezi9wjuO0k6y0MIC2IJ0QYDwY0V8usNAFkZSesFOHd+wViLREjo64+gbue0VhDMqwtQ4HmDqtfCWqQN9J9Bvh1Itfqkmb/3r/hojYng47r/SoqBoX79Oms+RruYyCsiFIYvqXQR7jljcGLjCO81CR/moMQ0wX9fTa6zZgDFv9oOoLHtaUmswp8PNhczrOGSeUuAtA== 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=JFe/nMZ8/GUgZSOMUKd//YcX46ErvJw00G9ZiXDbTQg=; b=HnUrR7kgeOQqDHKTsIYRCw+WcYIbrHGdeF8S9Ojxv8C3giKe1vMeWtkintGii6sU89jn4dZccWCm/yoK+1nPo+gPGzT9Aj/MUjj/bpDdIo16npuKSDGHP2spn1zc3byAAuGigitF6Q/jQbAasR3Rk851N24+SlrrdYKcA63175HhHiSdqFolaCBV46JLopGdx4neOAR15DEYAHmbwePN0NAzjvnj8YJ+M45GQQebagwn/31qUyHnvD6MpZRTRLuXnqnUFU5+0a6/bKXnoEsINBa2ifN1Yv4Apl+EKifixguG2j8FrbU93yZs7keOSBQA9q+1eoQGJ8CAycvNrGO5uQ== 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=JFe/nMZ8/GUgZSOMUKd//YcX46ErvJw00G9ZiXDbTQg=; b=SRPyWSNY9RiOC8vEA4h9ZSqBmmcKaei80UNHhjwx/FGWeT1l54TaWdGWi09LWWrRwPT8n053oaTtZGtWu2NBIcjvLMP1BknQXsxsZv33NBv3N81ClNGLsckdZkAdFgqyaaFHy2RpQ0kopJXD6LLxdFEE1NJ7g3ytpbg+W92bgWk= 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 DB8P193MB0565.EURP193.PROD.OUTLOOK.COM (2603:10a6:10:151::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.14; Tue, 24 May 2022 19:38:40 +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 19:38:40 +0000 Message-ID: <4d04cb4e-4e63-d31f-afed-8d43145b407c@xsightlabs.com> Date: Tue, 24 May 2022 15:38:35 -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: "Burakov, Anatoly" , dev@dpdk.org Cc: stephen@networkplumber.org, fengchengwen@huawei.com, mb@smartsharesystems.com, dmitry.kozliuk@gmail.com, bruce.richardson@intel.com, Honnappa.Nagarahalli@arm.com, nd@arm.com, 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: VI1PR06CA0199.eurprd06.prod.outlook.com (2603:10a6:802:2c::20) 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: 99340c00-a505-4fc7-310e-08da3dbd013b X-MS-TrafficTypeDiagnostic: DB8P193MB0565: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: mEQ0XkDXWpeFgOkEiYVVnCXQCe1NsXAM3oAajhTdPyEyuduhi9TZuwgubY7EL0RdKugE6iaZ2cjZdu9mqgaD4uTGwETvS8wclNxJ7YKYVVAXJXn1nfbuL0Y43QSb/hpu07N/7S+09sK/yOHO6EiCP9215+srMMiNHQ1hMyFNRAEmbfzP+hwFzMerHkqq/9ka4Oue/m7dNe5+MNIIobmTa8xm00v2ODDLTWUvybgY0STU7yD6ximefbUspoqdJVTwNWTL+WaXcXwL0HPIZRa82qVYD/u3ZP7+pVnKSysLyKW7Rn4o1cwUPrfqM/M8/fsxQ1FxUcpMfmP5z0e/Bacvt/BlkqQUSPEzG1LXnyjXeH/GBmZd6xQb69eWkQfzYDXAF7IrMoZ7k6Mc254JM6SKkgv0XFJ97MOGInIdlKQcnQcVwCtzAYR9gv18/0nd0TgofTL3l7pmfp3FhXACUOlBDgv+/kuLm3RB8pRQsbTzFn1GihuL1EJjGmVwlaaS5bnTd8Q2ItmXk9gtWZeXDkYbHE9yDhmTf56xF9vylAekhvgZ1bdbKyobq13pOps/s+f9Sjvi37ECXQFwhtMUp+/sI2gf2R+9zoiBaxcLmiryvBA5QWlY05YpPIt3UOa1JrbLRzu9VeNR+9AX1NkGBaGPPxyfEkBwUsqb7OyKoQqD+3xQmFa3cQZI6tUZys/+ymi41/rlV8Qkwi4auPCfYy5n8WKJg2/ORpIEc4DVB/z6W0Dl0VtUUKuCmdHDlPIjRjt4PhCPxFDNp79Bq2nmrvbQyQ== 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)(8676002)(66556008)(4326008)(66946007)(66476007)(508600001)(316002)(6486002)(8936002)(66574015)(7416002)(26005)(2616005)(186003)(2906002)(36756003)(6512007)(5660300002)(6506007)(6666004)(52116002)(31686004)(53546011)(38350700002)(38100700002)(86362001)(31696002)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bjM1MG83bzJ2TEpPV0phRVBQZzhoU3l5R0NKS1hrVFg2WER0VDlUY2Z1NWx5?= =?utf-8?B?YWlvVEtWZFo1RVg4cEpCTHExaVdiamNWWS8wN1BVcitGWmczTnhTbG4xNzdU?= =?utf-8?B?ZHg2clJFODZQT3FRZGtVV1YwUTNwdWYrWjRaalZwU1ppakhZZGdjNHgrc1pu?= =?utf-8?B?dmdTREtpRjcrekgyWU5QbVFNL2NxOVNQZ3k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B?SWd6di8raEF4bDIxaWhZQVZWYUY1Y09lREdWMC9qcjZYeDNrelQyanBXYkVq?= =?utf-8?B?VEJmMmo0R3N2N1pZRE8yNE1QV0hRc0ZwMFZKaGlyZ2p3c29RR1I0WjNQQUFN?= =?utf-8?B?SFVMMDd4QVFGOXg4bk5hNVBpMjREOW44TVcyYnd4TEJNR2xiT05SUy9sR1RU?= =?utf-8?B?VXI2NElvalR1UXBGQkhmell0WGZCZVR6TGczR3lveHJlRS9HZS9lQmRJRkdh?= =?utf-8?B?eW54RURqNTREK1hjY0g3VjRWRWVRWjdQNXhyWlRjbXFwa09DZm82U0t5NFo5?= =?utf-8?B?ZFkxSjE5VFVVVldkcWhIbGY4dTkzR3FkOVlFcjV5SVN3ZnN3TjNSZz09?= X-OriginatorOrg: xsightlabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 99340c00-a505-4fc7-310e-08da3dbd013b X-MS-Exchange-CrossTenant-AuthSource: DB9P193MB1482.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2022 19:38:40.6990 (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: 9ciUhSvVTMhNJF25d3E53Kv7yH31XcFMUjcELA+eztsoERgQIjkgFHOl2zfO+M85XM5MxWPWgGbgYHb47Y2jug== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8P193MB0565 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/24/2022 10:40 AM, Burakov, Anatoly wrote: > On 17-May-22 4:31 PM, Don Wallwork wrote: >> Add support for using hugepages for worker lcore stack memory.  The >> intent is to improve performance by reducing stack memory related TLB >> misses and also by using memory local to the NUMA node of each lcore. >> >> EAL option '--huge-worker-stack [stack-size-in-kbytes]' is added to >> allow >> the feature to be enabled at runtime.  If the size is not specified, >> the system pthread stack size will be used. >> >> Signed-off-by: Don Wallwork >> Acked-by: Morten Brørup >> --- > > > >> +++ b/lib/eal/common/eal_common_options.c >> @@ -103,6 +103,7 @@ eal_long_options[] = { >>       {OPT_TELEMETRY,         0, NULL, OPT_TELEMETRY_NUM }, >>       {OPT_NO_TELEMETRY,      0, NULL, OPT_NO_TELEMETRY_NUM }, >>       {OPT_FORCE_MAX_SIMD_BITWIDTH, 1, NULL, >> OPT_FORCE_MAX_SIMD_BITWIDTH_NUM}, >> +    {OPT_HUGE_WORKER_STACK, 2, NULL, OPT_HUGE_WORKER_STACK_NUM     }, >>         {0,                     0, NULL, 0                        } >>   }; >> @@ -1618,6 +1619,28 @@ eal_parse_huge_unlink(const char *arg, struct >> hugepage_file_discipline *out) >>       return -1; >>   } >>   +#ifndef RTE_EXEC_ENV_WINDOWS > > Why the #ifdef-ery? This is common code, I think we can just leave it > there? You could just add a check for `huge_worker_stack_size` in > Windows EAL to guard against using this setting for Windows, but > otherwise I see no need for an #ifdef here. > Was trying to follow the convention used in other cases, but I will post a new version that eliminates the ifdefs and checks huge_worker_stack_size in FreeBSD and Windows EAL.