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 F38BDA04FF; Tue, 24 May 2022 12:30:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9FF2640140; Tue, 24 May 2022 12:30:18 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id E712C400D6 for ; Tue, 24 May 2022 12:30:16 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24O99sot005733; Tue, 24 May 2022 03:30:16 -0700 Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2106.outbound.protection.outlook.com [104.47.58.106]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3g8vg488kq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 May 2022 03:30:15 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KQMTP4lSMi0clrJZGlc5dkO7JvmB/1TdvH06EtScyheOzpsiPy6mwA1XpchSGLuCbFH5wUS4i4/7wy4nJRWYm6ZTppdjOicQsNHraoBwZ43jlmnKokMfAGdc2tAZgptvJVKt+uWPpo1p6xjS5f5LKBwcd6TTGXNaH2yLVS2Kd32UOJQhULHW05Z9z7gZDVNiWWjc4ll7CDoKVyWtZ437/ko56U1PI+QofIlmSz3CwG2sIMt8mR7TkkOC6JyNo9VZAaPO4s6fXeYCoSz9FyaOlXQJVEvghNm7X+mxSrFL0epEKbN4rCIm6i07+4ZP2zm4j27TRf7KScsoT7ijcpaDQg== 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=fUdi2aFHdS3l1UH9qUhHWN/sRcss8cgcl5vow/jz4QE=; b=UaWUoDXH8Tb8lq142fG8FRxAR+EBhIT3NknA2u5TNs4YKmz++vqlwQwd22K5dZAjvjxwuNMZ28WrmlElRhH63NzKLDQqPpsn1XdOChSFwf5F985oM5DNX7bi4xDuT3kKhcZPibZve0sOmxiKa7nRgFLyONSzu/JM7KwVBNYREsUnsrMXbAxD8Hhy4TQJCfg+qrSSYGT7R+q0Mvy+LhOFv79ioGlBmhfnB2usX1n/dD7sAVFcWr8ZL69keCkv1J/fnLYUOghBd6Unj4d0NHRBIddW4Hs67Abh/zC/f+S4GyBRHr+8d6JNgRThwjHG/FTT5dTQd4XhFp57nQ03xpQXxA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fUdi2aFHdS3l1UH9qUhHWN/sRcss8cgcl5vow/jz4QE=; b=GV/Z+40SBTXAR36pKaKXGfD8mI9fgKt+DsKAPClSfcbrscEy93hK+XQ/HqQWbCD+IZSfD4cJt4J0dA+3XRbBkzwolvIwrjbX6DXmHKDWSVwzcN+OqGo8/+D+KiqXksWD7QMChI8JqcUZsTqWzqEBjLIRtDCDeLKpCqlF002I6xo= Received: from PH0PR18MB5167.namprd18.prod.outlook.com (2603:10b6:510:168::7) by BN6PR1801MB2066.namprd18.prod.outlook.com (2603:10b6:405:64::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.23; Tue, 24 May 2022 10:30:13 +0000 Received: from PH0PR18MB5167.namprd18.prod.outlook.com ([fe80::f002:71df:191a:f74a]) by PH0PR18MB5167.namprd18.prod.outlook.com ([fe80::f002:71df:191a:f74a%9]) with mapi id 15.20.5273.023; Tue, 24 May 2022 10:30:13 +0000 From: Amit Prakash Shukla To: Bruce Richardson CC: Anatoly Burakov , Ciara Power , "dev@dpdk.org" , Jerin Jacob Kollanukkaran Subject: RE: [EXT] Re: [PATCH v2] mem: telemetry support for memseg and element information Thread-Topic: [EXT] Re: [PATCH v2] mem: telemetry support for memseg and element information Thread-Index: AQHYa7JP9/+d0+9qfUOmRTFHaqS34a0sVSYAgAAl/lCAAAOvAIABVW2Q Date: Tue, 24 May 2022 10:30:13 +0000 Message-ID: References: <20220519063038.637836-1-amitprakashs@marvell.com> <20220519185712.879487-1-amitprakashs@marvell.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1215a2a3-f7bc-4c76-965a-08da3d706337 x-ms-traffictypediagnostic: BN6PR1801MB2066: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: wSK7A7SF3gg7MFY8mRnbD+AcqTMSAX52Surr4PR+Fr3tQmCBMEHLPXMpYshGwiY0Nk9YCL98+ZzH6s7YKBZral6lCWjm8CRRS/7w4cwpmLoDLI8eoCFNkvFgX0tzylDgqMJJ4C5iOAGR9JdEhK+wyEJbEd2XeAwssH50OpaQBNks1lS4EH+litjPZcLzIL45XaJ3ZHkjFP6fbEQHIP+IflBrWgf0OgaT0ugNnjRfSS+kgAlwd/Aq5npv+nl+Z8k8/a5JT23BruriPNsK/gdW7CJLdDd7xbJJN8W7BZGxRcGe9oIi8Ayh1ejNljwuSHx5pK9uYcGLcRRBPEK/VfynYCP+PxLZDrlRQ3G4XcJOnWGRPtoPJaDq+Dsm8zdrXBj0Gyu5f1Czz0x7YLC6fZO5525Iz+ELuWAdBH1LVmSGXPPvpJeAWDtsdV3izDHL91MXDE84DLJ8FK95axDpGODRspENH42ymv2BGw8uJAEewE6AFRb5sTihXK5Ddtdtiwi6fFpauiUbPQ2oakWJ/bmF3KAyrPGATx3lJXU4eX+bBhmR5rtzqqtkJgGXpMEeLzqFuddbmrGKscG7IzHj/CNLBbt4+anNbNDewyoc2gpcaYODMdCf6JELtI+i2i+NEDIxVoiq8yz+Wn0kRuMbuPEwFHzbEOQcnAfCSIWxl99yJit0AV/QFw3kE5YIUlSXrS3nFJIf5S0XVLnt6xd/bqVGZg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR18MB5167.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(186003)(7696005)(107886003)(64756008)(508600001)(83380400001)(2906002)(4326008)(66946007)(66556008)(33656002)(55016003)(5660300002)(71200400001)(6916009)(316002)(6506007)(54906003)(8936002)(38070700005)(52536014)(86362001)(9686003)(26005)(53546011)(122000001)(76116006)(66446008)(8676002)(38100700002)(66476007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?lebLSSw7gCKz1tOS9Oy4nYv03J5xErJ9X4mKQdr3yQ633FzupBQQhg0YeOox?= =?us-ascii?Q?PmILNJ0wrC8tNT7YD10Vc7ocTcE15F+BlOV1eIRxR/nt/dnVqqEmcjLrzdZp?= =?us-ascii?Q?QpFuEMcyrlZOKl7sCpLqTSGj9OijtQrvBWWoNhRBqD0OLT/3be9Eooz+AbvA?= =?us-ascii?Q?59FQmc2L1NgSBrmeQbWw+KffPB6Ss+he1UDAvooYN3kI9M+fJszqgeWSmodv?= =?us-ascii?Q?rM1B3mzLgp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cwwQEgev?= =?us-ascii?Q?pGAAQRxGUjKz3F/hHUPMxvuyxHLciwHG2SoSpUDicpVwWd2VHyEVRftaK1zY?= =?us-ascii?Q?zkXeHPtif9530aHTbqgEx4mWcqCviXOaqW6xzjpBhMG+kGRQvyl3uAZ/B/up?= =?us-ascii?Q?bFHMY8EPPuIUAxdCZfbIBV6pJRPY6wSb3sx1g8/Nz69PwciSMSbCu+pZcTon?= =?us-ascii?Q?DlcV1MLRXvsZV3rQVnpMdj8wSW4v0L3jzf2CFe/fnZLPfyzrmGIy1ue6/f9u?= =?us-ascii?Q?13Pkmz8C/j8kwb4/JLk9x+7pcd7ArlTU32w9lWDPza7OwHeo9GYpkYpu3BoG?= =?us-ascii?Q?EppbpWEBEhMPB61YU8nJpbizZFQum0CvQHbkKYDJ7tNaOmBqlj7iaPwF/LFn?= =?us-ascii?Q?ZKVtaDrFv+yxBQj/aOhHHpjgfrrzp89ks3oYc6f1ic4BsOgPI3b8f037isCs?= =?us-ascii?Q?fnXuX2jZrUk1xrdJjt4WkCOzaTfCAp4S1OCJNr/o+5q+lyMc39AoKbTszk3I?= =?us-ascii?Q?a1oXPmfTr9Yp1e6LXyylnl+4d/lmySU2y8RT54jIpC2m9wEo5noF4pAdjddZ?= =?us-ascii?Q?uPZ506pGlqD2DX6yt5SEBk24jAffsajGKMqZFGgwvpbyPfxOm4QJTuvK8JUX?= =?us-ascii?Q?58EwcsyG1Q=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR18MB5167.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1215a2a3-f7bc-4c76-965a-08da3d706337 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 May 2022 10:30:13.6409 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 91FPmmqSYjCsMiGhKNF1gSM/q+hg+7eyzY8Uiyyfi9UFqRQXoOd69KwrD+iNjDXACXBkVQN5ZgiO4ZWNzRcubhNXBNFfInwUGI95XoqFS4s= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR1801MB2066 X-Proofpoint-ORIG-GUID: zw5xGqKry9jeQ3G-QHX8nf1br3PyVZ_Z X-Proofpoint-GUID: zw5xGqKry9jeQ3G-QHX8nf1br3PyVZ_Z X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-24_06,2022-05-23_01,2022-02-23_01 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 > -----Original Message----- > From: Bruce Richardson > Sent: Monday, May 23, 2022 7:14 PM > To: Amit Prakash Shukla > Cc: Anatoly Burakov ; Ciara Power > ; dev@dpdk.org; Jerin Jacob Kollanukkaran > > Subject: Re: [EXT] Re: [PATCH v2] mem: telemetry support for memseg and > element information >=20 > On Mon, May 23, 2022 at 01:35:06PM +0000, Amit Prakash Shukla wrote: > > Thanks Bruce for the review suggestions. I make the changes as suggeste= d > in next version of the patch. > > > > > -----Original Message----- > > > From: Bruce Richardson > > > Sent: Monday, May 23, 2022 4:45 PM > > > To: Amit Prakash Shukla > > > Cc: Anatoly Burakov ; Ciara Power > > > ; dev@dpdk.org; Jerin Jacob Kollanukkaran > > > > > > Subject: [EXT] Re: [PATCH v2] mem: telemetry support for memseg and > > > element information > > > > > > External Email > > > > > > -------------------------------------------------------------------- > > > -- On Fri, May 20, 2022 at 12:27:12AM +0530, Amit Prakash Shukla > > > wrote: > > > > Changes adds telemetry support to display memory occupancy in > > > > memseg and the information of the elements allocated from a memseg > > > > based on arguments provided by user. This patch adds following > endpoints: > > > > > > > > 1. /eal/active_memseg_list > > > > The command displays the memseg list from which the memory has > > > > been allocated. > > > > Example: > > > > --> /eal/active_memseg_list > > > > {"/eal/active_memseg_list": [0, 1]} > > > > > > > > 2. /eal/memseg_list, The command outputs the > > > > memsegs, from which the memory is allocated, for the memseg_list > > > > given as input. Command also supports help. > > > > Example: > > > > --> /eal/memseg_list,help > > > > {"/eal/memseg_list": "/eal/memseg_list,"} > > > > > > > > --> /eal/memseg_list,1 > > > > {"/eal/memseg_list": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, \ 12, > > > > 13, 14, 15]} > > > > > > > > > > This is really confusing because, if I understand this correctly, > > > we have a conflict of terms here - in telemetry "list" is generally > > > used to get the possible values of ids at the top level, with the > > > info and other commands used to get the next level of detail down, > > > while the initial command here returns details on the memseg lists, i= .e. it > should really be "memseg_list_list" command, i.e. > > > list the memseg lists. Can we perhaps come up with a different term > > > for the memseg list, because right now I think the above commands > > > should be "memseg_list_list" and "memseg_list_info"? > > > > > > > Sure, will change the naming. > > >=20 > Have a think about it too, because my suggested naming is still rather > unwieldy and not very nice. I'm not sure what the best naming here is. Sure. >=20 > Are the memsegs only identified by number inside each memseg list? Are > there no names that could be used instead? Each memseg-list contains a fbarray and fbarray contains list of memsegs. Memsegs in fbarray are identified by numbers. > Could you merge the > memseg_list_list and memseg_list_info into one to print out a list of all > memsegs in one go across multiple lists?=20 Have kept memseg_list_list and memseg_list_info separate for users to ident= ify,=20 while requesting memseg info, which memseg list a memseg belongs to. >How many memsegs are there likely > to be? Max memsegs per list is 8192. #define RTE_MAX_MEMSEG_LISTS 128 #define RTE_MAX_MEMSEG_PER_LIST 8192=20 > > > > > > > 3. /eal/memseg_info,: > > > > The command outputs the memseg information based on the > > > > memseg-list and the memseg-id given as input. Command also > supports help. > > > > Example: > > > > --> /eal/memseg_info,help > > > > {"/eal/memseg_info": "/eal/memseg_info,: \ > > > > "} > > > > > > > > --> /eal/memseg_info,0:10 > > > > {"/eal/memseg_info": {"Memseg_list_index": 0, \ > > > > "Memseg_index": 10, "Memseg_list_len": 64, \ > > > > "Start_addr": "0x260000000", "End_addr": "0x280000000", \ > > > > "Size": 536870912}} > > > > > > > > --> /eal/memseg_info,1:15 > > > > {"/eal/memseg_info": {"Memseg_list_index": 1, \ > > > > "Memseg_index": 15, "Memseg_list_len": 64, \ > > > > "Start_addr": "0xb20000000", "End_addr": "0xb40000000", \ > > > > "Size": 536870912}} > > > > > > > > > > For telemetry library, the parameters should all be comma-separated > > > rather than colon-separated. > > > > > > > Sure, will change it to comma-separated. > > > > > > 4. /eal/elem_list,:: > > > > The command outputs number of elements in a memseg based on the > > > > heap-id, memseg-list-id and memseg-id given as input. > > > > Command also supports help. > > > > Example: > > > > --> /eal/elem_list,help > > > > {"/eal/elem_list": "/eal/elem_list,: \ > > > > :"} > > > > > > > > --> /eal/elem_list,0:0:63 > > > > {"/eal/elem_list": {"Element_count": 52}} > > > > > > > > --> /eal/elem_list,0:1:15 > > > > {"/eal/elem_list": {"Element_count": 52}} > > > > > > > > 5. /eal/elem_info,::: \ > > > > - > > > > The command outputs element information like element start > > > > address, end address, to which memseg it belongs, element state, > element size. > > > > User can give a range of elements to be printed. Command also > > > > supports help. > > > > Example: > > > > --> /eal/elem_info,help > > > > {"/eal/elem_info": "/eal/elem_info,: \ > > > > :: -"} > > > > > > > > The last 2 arguments "-" is to print range = of > elements. Can I use hyphen here ? > > >=20 > I'm not sure I like printing based off a range, especially since doing so= can lead > to very large outputs. I would still tend towards separating with a comma > here, if you only support a single range at a time. I would only support = using a > "-" in the specifier, if you supported multiple range options in one go, = e.g. as > is done with DPDK -l EAL flag. >=20 > > > > --> /eal/elem_info,0:1:15:1-2 > > > > {"/eal/elem_info": {"elem_info.1": {"msl_id": 1, \ > > > > "ms_id": 15, "memseg_start_addr": "0xb20000000", \ > > > > "memseg_end_addr": "0xb40000000", \ > > > > "element_start_addr": "0xb201fe680", \ > > > > "element_end_addr": "0xb20bfe700", \ > > > > "element_size": 10485888, "element_state": "Busy"}, \ > > > > "elem_info.2": {"msl_id": 1, "ms_id": 15, \ > > > > "memseg_start_addr": "0xb20000000", \ > > > > "memseg_end_addr": "0xb40000000", \ > > > > "element_start_addr": "0xb20bfe700", \ > > > > "element_end_addr": "0xb215fe780", "element_size": 10485888, \ > > > > "element_state": "Busy"}, "Element_count": 2}} > > > > > > > > > > The "elem" name is ambiguous, I think. Are these malloc elements or > > > some other type of elements. > > > > > > > These are malloc elements. I will change the naming. > > > > > > > > > Increased telemetry output buffer to 64K to support large size > > > > telemetry data output. > > > > > > > > > > That's a 4x increase in max size. Is it really necessary? Is > > > telemetry the best way to output this info, and do you see users real= ly > needing it? > > > > This change is not required now. The code has been internally optimized= . I > will revert this change. >=20 > Thanks, > /Bruce Thanks, Amit Shukla