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 1F4C9A04BE; Wed, 2 Sep 2020 16:50:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F2A591C066; Wed, 2 Sep 2020 16:50:35 +0200 (CEST) Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by dpdk.org (Postfix) with ESMTP id 854CD137D for ; Wed, 2 Sep 2020 16:50:34 +0200 (CEST) Received: by mail-pg1-f195.google.com with SMTP id 31so2642681pgy.13 for ; Wed, 02 Sep 2020 07:50:34 -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=L1u6txJTbGsIV6d6i1WSsvkHUb2TUNKdFMJBp8inuaQ=; b=wWYvqQCSigBv/1NamXGkVSlLMnxvDETjP8TnAWkD4aZSgwm/G+QGOwq8fsb3V32Hux xYR8V4FQ9So7Dv0vumuvQH4zk5TEcA47HURuqyYxnpnQKG5YFtaWGB00Ypr7umeYJEgW TfL6K5xdCY+YEVmdcmxPLl+zk8myg62Xwixomzu/sAPy+1U4whb21YyT00NMJT/kIb0+ 6Ob8m1AJIbmkjQjTbP70Rh4WPIhZs04hn2fasJqr68Zg0giArV4wk6bsMbHouJ0lZFZ8 wLj5Dnql702bYwSQJW/wD9qVQ20BSer4NePBDUogdLsgQW+nLFI9gefmXrLNMwCY7Jv2 0eOw== 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=L1u6txJTbGsIV6d6i1WSsvkHUb2TUNKdFMJBp8inuaQ=; b=klt4T2nxQ35u5DdFK1U0mjMODGZvtlRv/rsGUPTeOTwLp/8wyVdiW/osM6ixpkZnAr cBJb8hxF1MIy0Vt0bc2I1quOzzYSm3/udjdq6wKZqoP7kpqx0Z0uubEb3xGi19gPuy2r 8Na16yVy+oGWHgqiSxag0F/bBFL1Ru1X0NjJxfQY8j5nBqR6+CVURScaF2oiSJWW9qAg SAlBdIBSYQcCIbrmHzX31UMk5H09vl/hkOzEk/c7snuv6dmlZjVA7N/a0JqN94uXkRr7 cOExhZBSdjx+PDKrOz/NQ2KjJiB7ENnS190MGDNvPYhMpolI62RV0/TFQKe701nrXWTP 1LfA== X-Gm-Message-State: AOAM531PbScRhQ7FZiNTaN6wDSILU43Q3inhJiBMqb7B93sW3Xiqwpnd Uk07HE/P6N8IQ7zn2avnGp4cMw== X-Google-Smtp-Source: ABdhPJziwBsZAmRzN1N/rgoTCHut/HbY4qGOU0W32JylSuNN64LtSWamM+UiLf9nry7ta7Vb9VqNhA== X-Received: by 2002:aa7:96c8:: with SMTP id h8mr3508294pfq.108.1599058233698; Wed, 02 Sep 2020 07:50:33 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id r10sm4729223pjp.49.2020.09.02.07.50.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2020 07:50:33 -0700 (PDT) Date: Wed, 2 Sep 2020 07:50:30 -0700 From: Stephen Hemminger To: Bruce Richardson Cc: dev@dpdk.org Message-ID: <20200902075030.2567b134@hermes.lan> In-Reply-To: <20200902095507.GA1064@bricha3-MOBL.ger.corp.intel.com> References: <2173565.OSGeAx7z5R@thomas> <20200901165643.15668-1-stephen@networkplumber.org> <20200902095507.GA1064@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] 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 Wed, 2 Sep 2020 10:55:07 +0100 Bruce Richardson wrote: > On Tue, Sep 01, 2020 at 09:56:43AM -0700, Stephen Hemminger wrote: > > This is an improved version of the setup of huge pages > > bases on earlier DPDK setup. Differences are: > > * it autodetects NUMA vs non NUMA > > * it allows setting different page sizes > > recent kernels support multiple sizes. > > * it accepts a parameter in bytes (not pages). > > > > Signed-off-by: Stephen Hemminger > > --- > > This is lightly tested, it still needs testing on multiple architectures > > etc. > > > > usertools/hugepage-setup.sh | 169 ++++++++++++++++++++++++++++++++++++ > > 1 file changed, 169 insertions(+) > > create mode 100755 usertools/hugepage-setup.sh > > > > diff --git a/usertools/hugepage-setup.sh b/usertools/hugepage-setup.sh > > new file mode 100755 > > index 000000000000..df132e2f8d64 > > --- /dev/null > > +++ b/usertools/hugepage-setup.sh > > @@ -0,0 +1,169 @@ > > +#! /bin/bash > > Is there a good reason to limit this to bash rather than general "sh"? > > Also, if we ever see this script being expanded to cover more, would it be > more extensible in python rather than shell? Mainly because bash has arithmetic operations, and doing it with normal shell requires using expr.