From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2A0DEA04C5; Fri, 4 Sep 2020 19:18:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6707E1C0BC; Fri, 4 Sep 2020 19:18:57 +0200 (CEST) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by dpdk.org (Postfix) with ESMTP id 1BC00255 for ; Fri, 4 Sep 2020 19:18:54 +0200 (CEST) Received: by mail-pj1-f54.google.com with SMTP id o16so3514429pjr.2 for ; Fri, 04 Sep 2020 10:18:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vzRrnob0Trw1x+gBSd6H6VbNvFT9iiETZegm0FieqfU=; b=JmamiM4iRiD0WZZHTuPgXryjWR5rEKEy2dTjPO9wh9EuJT+fskvIaNYGbFJF2IoNJI /THvBw7g8x1tn51yQu2fq+sgPeGTRLYfvpNIjrjNKpal0KnpueRvXcvnIYHlQ2ks08KA U3CGh8UixFFoj3H2L6/jsJBLRUuEj9jWhngvLtwOSy4JMxLx96fWLm17uAKV+ntBCl0a 8yOeapy88uE1jqzVhoV9JfPHssrvCiS/oav6r39IHh1eaUJgGuneNbao4G3eUGN77iNF BOcCUkst/G5+IyN2zNS5BkSTSpIfcCUY+2EfCIrJ7d6ZJ+Ckso3h1Tm8TJD5AbL1GfMG zaBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vzRrnob0Trw1x+gBSd6H6VbNvFT9iiETZegm0FieqfU=; b=mipA5p+OuLASLNr2I6oKMR/V+SW0QqbPpKs3ULwu+7g1HSlqLaVSVsDHfPBGODQCF5 OuaV+zH2amDQg6YYtCAGlttjifuX3sCtn+mYfuAR9tUkrnIRJJb7P1XJw2n5nPK20gpq rm5WRlRxlZztWc1aolrmq+kgQipvOQxFHinrNtFYTPMRhZbmmAt06uTBTnvQaMn5QCyC gLnm2Z/wIVC2dJi6PF3mjJy1Pvtu1MDSv31TN1925kwvOkcxTaHCsFcbTl8qSlQOyY/B UI8O40PzLfHh2qL/3ozhtSE5z8U5pKPQ2Yjv3ROWQINcoSZP82MCzKZjHxD+rt7LKhsY E/gg== X-Gm-Message-State: AOAM533ZNEl5uqrCkBgeC9T1Aa0WBOka/9o+EXmu3JTy2VGBbmZl/RHd BliHvDeThmNzbguhJIBV2xxSEA== X-Google-Smtp-Source: ABdhPJysYIWmZWsHG+SqsaDAYzZdAfeExFAXrB7ueeh3NcgZacg7qau6XyiLWHClQw+SegXpcloIpg== X-Received: by 2002:a17:90a:aa8e:: with SMTP id l14mr9537763pjq.67.1599239934051; Fri, 04 Sep 2020 10:18:54 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id w203sm2825828pff.0.2020.09.04.10.18.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Sep 2020 10:18:53 -0700 (PDT) Date: Fri, 4 Sep 2020 10:18:45 -0700 From: Stephen Hemminger To: Bruce Richardson Cc: dev@dpdk.org Message-ID: <20200904101845.4373a2ad@hermes.lan> In-Reply-To: <20200904092228.GB1627@bricha3-MOBL.ger.corp.intel.com> References: <20200901165643.15668-1-stephen@networkplumber.org> <20200903224831.5932-1-stephen@networkplumber.org> <20200904092228.GB1627@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2] usertools: add huge page setup script 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, 4 Sep 2020 10:22:28 +0100 Bruce Richardson wrote: > > +def set_pages(pages, hugepgsz): > > + '''Sets the numberof huge pages to be reserved''' > > + if is_numa(): > > + set_numa_pages(pages, hugepgsz) > > + else: > > + set_non_numa_pages(pages, hugepgsz) > > + > > I'm not sure I agree with this behaviour for numa nodes. When a size is > specified on a numa system we probably don't want to reserve that size on > all nodes. I think one of two other options actually makes more sense: > 1. Divide up the allocation equally between all nodes > 2. Require the user to specify a numa node for the allocation. > > Option #2 is best, I think. I was just reproducing what old script does for now. How about a --node option to do a single node and by default divide by number of nodes? > I think the trend in python is to use argparse rather than getopt, though > personally I don't have strong feelings about the issue. Used getopt because that is what devbind was using.