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 8A4FBA0C45; Wed, 22 Sep 2021 15:52:44 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 756FE41198; Wed, 22 Sep 2021 15:52:44 +0200 (CEST) Received: from mx0b-002c1b01.pphosted.com (mx0b-002c1b01.pphosted.com [148.163.155.12]) by mails.dpdk.org (Postfix) with ESMTP id 761D841196 for ; Wed, 22 Sep 2021 15:52:42 +0200 (CEST) Received: from pps.filterd (m0127842.ppops.net [127.0.0.1]) by mx0b-002c1b01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 18M7Kk5A004284; Wed, 22 Sep 2021 06:52:41 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=proofpoint20171006; bh=fQF9TQxSvan1hJFw/LByVVdcNTytLuiOP3MCY4mtsVY=; b=gJO59Q69UOS2De/WHyPiuFnoUCObD/eK0PADhL6LdSei7vNJX0hhjUu8YQnG3tCSabnQ aPfKc316+iXr/eqBpqZUHxA5HTqH51fR91ZHVKpZx7RMxP4yANwHI+FIiFh1T3/6eGJK DoXfIsRGBJIRiIv7GzUV7jxoHqwQ5kOLNk90MyHSI6lOjkjSC8O8qlawHMscBj3Dz1so z07+LLI8QcNRdYpxQY3l6T05rnHklnPsABRRfXpU6yoh/zvLsAp1byhsoPT7uwx1OWux ncG/UZBlTWbWqmWC6bSG5JI6X067t97Tv4hc5+gcf/HG7WLG853vfZ41UHeG3Wn6p8Wj 5Q== Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2173.outbound.protection.outlook.com [104.47.56.173]) by mx0b-002c1b01.pphosted.com with ESMTP id 3b7q5jhxm8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Sep 2021 06:52:41 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nsK79SiuRJLHmCcBsbA1Pm+e73wO8S7XeomNE/vhpjAMZ8MA7V4zzOecQUOm7oyvpKSbsZtXzWOA4TgW6rZOqIhefPheBLujA9lbEbqTMTXgGx/wMG4SXx/6WrsZgekg2WWuLvbm5yMX3CML+Kt4hg+5hTXqoUPH6eVRVKjuOKC3c//Cr5OyP/fukx6TnFUfhGVd00/tg2lfhayHB29YmBmtFCfx3oi8RfzVMf62/+crRsU8ghfxt4Q2edKdfalZi0V8Xp8VPCsJNW5p7NtFV/Ga0OM3ODDo2B2LdVgTiyyK+nSUeeBBKY5uBl+BjUPqpxtDmRZM6b8gUt4StGufag== 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; bh=fQF9TQxSvan1hJFw/LByVVdcNTytLuiOP3MCY4mtsVY=; b=iCnHBoweoJnzQzeGjFTqVWc/4LjfpBTX1/8IV5I2HKm//pwdxfj987CxMa14PNe2WJSOAOndfhV8S/9s5pTDRJwoqS1IHQpZbe7Y88loLNh9uUt9PMyxMNjPN2xVBnGDfDk8Lnt2B2kv0laQx0uw4o05QrUQKm6LJHt8g1KnTTogyZ9TRS5O3XeonlWM+l4iVIDGdsnRJ08+vRCyGf/TI+gdN2kjfmc6bPoXqYgrgZpoIdJwahNAtXROlqJDxS40NcovwjYYX4tpJZ9OVgkv0gcGQX2Iq4jNaIhdItBTlyH6Dr26K4Z3YDNdaybpiutg0Nnm1ykUDqIWPQ2k+uMwpQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nutanix.com; dmarc=pass action=none header.from=nutanix.com; dkim=pass header.d=nutanix.com; arc=none Received: from BL0PR02MB4580.namprd02.prod.outlook.com (2603:10b6:208:40::27) by BL3PR02MB7922.namprd02.prod.outlook.com (2603:10b6:208:351::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13; Wed, 22 Sep 2021 13:52:39 +0000 Received: from BL0PR02MB4580.namprd02.prod.outlook.com ([fe80::b9d9:2c4b:c85e:dbd0]) by BL0PR02MB4580.namprd02.prod.outlook.com ([fe80::b9d9:2c4b:c85e:dbd0%7]) with mapi id 15.20.4523.018; Wed, 22 Sep 2021 13:52:39 +0000 From: John Levon To: "dkozlyuk@nvidia.com" CC: "dev@dpdk.org" , Anatoly Burakov , Viacheslav Ovsiienko Thread-Topic: [PATCH v5 1/3] eal/linux: make hugetlbfs analysis reusable Thread-Index: AQHXrsENUfgnJj+MzUGlUX16ZnlEKauwFLMA Date: Wed, 22 Sep 2021 13:52:39 +0000 Message-ID: References: <20210920125302.820273-1-dkozlyuk@nvidia.com> <20210921081632.858873-1-dkozlyuk@nvidia.com> <20210921081632.858873-2-dkozlyuk@nvidia.com> In-Reply-To: <20210921081632.858873-2-dkozlyuk@nvidia.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=nutanix.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3cd7b72c-873b-46df-f862-08d97dd03dd2 x-ms-traffictypediagnostic: BL3PR02MB7922: x-microsoft-antispam-prvs: x-proofpoint-crosstenant: true x-ms-oob-tlc-oobclassifiers: OLM:2399; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: IA4rhtqqnK6drP9USN8fkIXfnKluhfaTeyCjoxzWYzG07fxqxSVMFgSZ3dtFPhJZ9ptbtPcQDfGI389uwcQiG9ksBt8//IlPRpI9kSJyIw65FbMrpf21LTj5dSZM+2aZtOlEeZQlE8NcxGb17ha9RhjE49ltR2PF+Hfd3/vC52Bvad3rL9z39C1YyU12Colou//Nu8FePM3Znd5MfpdBed1netLDa24/Fs3zQqnst+6uy79q5UVD0L84xq+0kFxF6ut491CFWAUsn1Xq4N3bdi11OMNjjdTN3fdAAWKtyYGoqtUp3EaG8sddFTKZe6D8z94+WayQDvwfUgs8sC+sjB94QWf09Yi/IPPhUCUIvYBDaDveMLKBU1lclIoQL920oiANuoc+KbDXmssyCHJpxwS4JxR8KcGJtgHMs3luW48UB9nhJC35HiOJ1zGLPsK9URElTz7OKGTmfpye1uM6QnVHdoe6tx/d5zi+44qofs2ICt0RASJlqt1BdcE4NlkO3ckEl3u0XDh5jJb4G/7iYtvxiaeyM55yrpmr0e69rxDHNv+sAxa8FptmjLIP2YASiSdEri5Wf09XpNyQhRnRxk1YNXpUNKpK2jT9OFKQf3do7YNvo4YwT0e0kBbtCIi8Ggn9kJtORFtOlUzfaPo4UZ0mW+F2eJOvXzJgsBTwSEW6ZQBb6RBEHFRfdcvUeFRJ9cOLKPA9AaMkpkVBRiwnGw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL0PR02MB4580.namprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(186003)(2906002)(26005)(66946007)(5660300002)(6506007)(4744005)(71200400001)(6486002)(6512007)(316002)(6916009)(9686003)(54906003)(38070700005)(66446008)(8936002)(122000001)(38100700002)(8676002)(4326008)(66476007)(44832011)(66556008)(508600001)(36756003)(91956017)(64756008)(76116006)(86362001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?qPPufAmdpFEm63kzhJ32IdvTbU00SqtloG77XNOi4tuSxULMEX4NEoL+iZSc?= =?us-ascii?Q?jEorutEcPBptsQMbeqvAGDKn+cy3Tp29vfCXLUt4YKV7tj0xiX1AG9qISCC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efDJN4IQ05C40VFQHMREOPzy/?= =?us-ascii?Q?rcTKgN7RGG/fjiFkfBbDGh0irF50hWgOn1YS7alZ+Legnrd4xw/VYBvSjGKo?= =?us-ascii?Q?8LFEhmBygwngMWVOHdQ7mXXzLSTgE3bBpwv8qI4bWMQfIx9IJ8rkSd9/sVsU?= =?us-ascii?Q?9KGhL+tFc6X3W2sOXr6lptGwQDGDX9DbVmbc8ijDvmPuKhCfp0Eg2wQ4Nx0K?= =?us-ascii?Q?/Y9EASohSIiq66O1cuq4hUpFTu41nZWgbDufakDa/jg9UygcIskERDCduZpW?= =?us-ascii?Q?UlM09VPRLwIyeMdtTjoAIqefJuGdgrPAN2vYtdlztbRT09z3s+SnOc5ujlHx?= =?us-ascii?Q?YWFryeGIErSf0w1LZv6zKU8N?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-ID: <51B5C10D2CE26A419D0363B34883E369@namprd02.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BL0PR02MB4580.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3cd7b72c-873b-46df-f862-08d97dd03dd2 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Sep 2021 13:52:39.1792 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: bb047546-786f-4de1-bd75-24e5b6f79043 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: H8BsyC+GICS1qviRYr9rOXcNB89JzCngplQgzXqQ5nVCuKpVqyhdp4wGHtYouhYRj/aJW8UIfOLmnspbYksvBA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR02MB7922 X-Proofpoint-GUID: L3boVgs-PmelZ2Bi22hRkOU-YOu_J5pd X-Proofpoint-ORIG-GUID: L3boVgs-PmelZ2Bi22hRkOU-YOu_J5pd X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-09-22_05,2021-09-22_01,2020-04-07_01 X-Proofpoint-Spam-Reason: safe Subject: Re: [dpdk-dev] [PATCH v5 1/3] eal/linux: make hugetlbfs analysis reusable 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 Sender: "dev" On Tue, Sep 21, 2021 at 11:16:30AM +0300, dkozlyuk@nvidia.com wrote: > From: Dmitry Kozlyuk >=20 > get_hugepage_dir() searched for a hugetlbfs mount with a given page size > using handcraft parsing of /proc/mounts and mixing traversal logic with > selecting the needed entry. Separate code to enumerate hugetlbfs mounts > to eal_hugepage_mount_walk() taking a callback that can inspect already > parsed entries. Use mntent(3) API for parsing. This allows to reuse > enumeration logic in subsequent patches. >=20 > Signed-off-by: Dmitry Kozlyuk > Reviewed-by: Viacheslav Ovsiienko Reviewed-by: John Levon regards john=