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 A39FAA0547; Wed, 8 Jun 2022 02:00:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5CEAE4021F; Wed, 8 Jun 2022 02:00:34 +0200 (CEST) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by mails.dpdk.org (Postfix) with ESMTP id ADEB94021D for ; Wed, 8 Jun 2022 02:00:32 +0200 (CEST) Received: by mail-pl1-f173.google.com with SMTP id u18so16192523plb.3 for ; Tue, 07 Jun 2022 17:00:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1rQBnty/Fkr6lz/vqA79nhaVmRcuv8UphnhmFzpsGgA=; b=6zgA+cMCtJlwBgfjJj1oLB9GqXEVM2dRn8PumKlfvBZN2QEAsP/FY79WNcFWyfbBnv Zj88YbSy8iToTNb0RQ6JEC20HL8zHcmFTL02GRv2eMUjO9M9KmawSZvMYtNzxCofvZrD CrPhb0aZqKC16IEoPEQcilCYJWddNSl8umCfH+Cup+OORJyhTYawm296mMSl9EhVQ/h7 W0tYasth0obufzMmZWuyftTP5leCF8VCDf8231gdRIEPe3Ni284uyCioNiyqMWeYnI0z XO7EI2MVfVe6uZ1JmuuieTR9xcvwFEMnUUz2293GG5F3Lq55RSCBVGhP3Gbj/cdmL3DG WFlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1rQBnty/Fkr6lz/vqA79nhaVmRcuv8UphnhmFzpsGgA=; b=dU6Dmii5+NFxoppm59TjvK1OHMdKfF3BQ4HQ6nLE9BJFe0QrqHuiCmiDVfdcmIrNwd lWHER20Rd6oLvtBnS+OKkub4s4JCY1y3qJh4AZaKpZ9Yl4BO42oWA7Rq3Bd9rTyAgDB8 J9+zwS9oR+ecdxqHFl8uZpOphzF0mXMDZzeIeuQn5H3BJ7IRBSsOpFciiWDJLFzuhcMW 139l76fSCtJxCVV6qsJt2aKjVzDezVNomhwcZBaJ02U+Q+FQjE7wgqteid35egQjnDKA Bs7ol6k17aOG7UO2Os0eBs7nIDj3IwMONR9odksAfdpmsXTfEb1yZk4QgfM/9t3yr0m+ kHYw== X-Gm-Message-State: AOAM531dtsoRliTR4Al44MSyVychrXVtaHmfCyHxlEq0OGRcFPjrECWC HZ+DqatqLIK1hUJCYlAI99AcCA== X-Google-Smtp-Source: ABdhPJy6H6lMBJA8ad96UkxTcYGdfsy7hIPkI26W2jETI81SJ3jNQqY0smYTFraTu/qcFrUep1HY0w== X-Received: by 2002:a17:90a:5792:b0:1e0:63f3:b3ba with SMTP id g18-20020a17090a579200b001e063f3b3bamr34873919pji.102.1654646431821; Tue, 07 Jun 2022 17:00:31 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id m10-20020a170902db0a00b0015ee985999dsm13258522plx.97.2022.06.07.17.00.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 17:00:31 -0700 (PDT) Date: Tue, 7 Jun 2022 17:00:28 -0700 From: Stephen Hemminger To: Dmitry Kozlyuk Cc: , Thomas Monjalon Subject: Re: [PATCH 2/4] usertools: add option to change mount point owner Message-ID: <20220607170028.48e04a5e@hermes.local> In-Reply-To: <20220607234949.2311884-3-dkozlyuk@nvidia.com> References: <20220607234949.2311884-1-dkozlyuk@nvidia.com> <20220607234949.2311884-3-dkozlyuk@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Wed, 8 Jun 2022 02:49:47 +0300 Dmitry Kozlyuk wrote: > > -def mount_huge(pagesize, mountpoint): > +def mount_huge(pagesize, mountpoint, owner): > '''Mount the huge TLB file system''' > if mountpoint in get_mountpoints(): > print(mountpoint, "already mounted") > @@ -180,6 +180,8 @@ def mount_huge(pagesize, mountpoint): > cmd += ' -o pagesize={}'.format(pagesize * 1024) > cmd += ' nodev ' + mountpoint > os.system(cmd) > + if owner: > + os.system('chown {} {}'.format(owner, mountpoint)) > The hugetlb filesystem type already supports set owner. Please use that instead of an additional chown command. https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt If the user applications are going to request huge pages using mmap system call, then it is required that system administrator mount a file system of type hugetlbfs: mount -t hugetlbfs \ -o uid=,gid=,mode=,pagesize=,size=,\ min_size=,nr_inodes= none /mnt/huge