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 57CE1A04FD; Mon, 23 May 2022 13:14:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EB33F40141; Mon, 23 May 2022 13:14:38 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id D8E3B40041 for ; Mon, 23 May 2022 13:14:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653304477; x=1684840477; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=2zNHv1fK/iK5z4YdbQvbRLFWOeau5gcwUWTowqe6lZ0=; b=lhfduyqfFjukPYNPJeL0+2c7qhQ6qUGH2xKqPU5YqhvWn9OlBwTNxpQG jA/3tk3CLWg90BnB8BqNcSY/BmRP75ZGIb11UrUblCU9kBDDNnBlBOluK ZEEE3bMAbM5MxxbXlvSXfHPQFXqc+GP9/8k9K3DloFhLfsMMHebSAGvjk NC4CdzyTL6Y3unSa4x2fEu/ccYfq17e3S4BY9xq2mr2MWZhxow+EmavHH u+3SQ/KJXJw8rVDnsUmZUJvjlG62CufUNq8jXOtZmOo34z288sHemZtfS Q71pZl+SHBMNy8nofM7EA1R93xQ4OQnIlGCSMAxk0evqKG4ugfwzqCYQA g==; X-IronPort-AV: E=McAfee;i="6400,9594,10355"; a="359581059" X-IronPort-AV: E=Sophos;i="5.91,246,1647327600"; d="scan'208";a="359581059" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2022 04:14:35 -0700 X-IronPort-AV: E=Sophos;i="5.91,246,1647327600"; d="scan'208";a="744681791" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.4.106]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 23 May 2022 04:14:34 -0700 Date: Mon, 23 May 2022 12:14:30 +0100 From: Bruce Richardson To: Amit Prakash Shukla Cc: Anatoly Burakov , Ciara Power , dev@dpdk.org, jerinj@marvell.com Subject: Re: [PATCH v2] mem: telemetry support for memseg and element information Message-ID: References: <20220519063038.637836-1-amitprakashs@marvell.com> <20220519185712.879487-1-amitprakashs@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220519185712.879487-1-amitprakashs@marvell.com> 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 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"? > 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. > 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,: \ > :: -"} > > --> /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. > 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 really needing it?