DPDK patches and discussions
 help / color / mirror / Atom feed
From: Amit Prakash Shukla <amitprakashs@marvell.com>
To: "Burakov, Anatoly" <anatoly.burakov@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
	"david.marchand@redhat.com" <david.marchand@redhat.com>,
	"bruce.richardson@intel.com" <bruce.richardson@intel.com>,
	"ciara.power@intel.com" <ciara.power@intel.com>,
	"dmitry.kozliuk@gmail.com" <dmitry.kozliuk@gmail.com>
Subject: RE: [EXT] Re: [PATCH v7] mem: telemetry support for memseg and element information
Date: Wed, 17 May 2023 09:08:12 +0000	[thread overview]
Message-ID: <PH0PR18MB5167CBC6D923D5F15A34EA53C87E9@PH0PR18MB5167.namprd18.prod.outlook.com> (raw)
In-Reply-To: <3620972f-3954-1153-6601-f3b9d3f20b5f@intel.com>

Thanks Anatoly for review and feedback. I will make the suggested changes in next version of the patch.

Thanks,
Amit Shukla

> -----Original Message-----
> From: Burakov, Anatoly <anatoly.burakov@intel.com>
> Sent: Tuesday, May 16, 2023 4:17 PM
> To: Amit Prakash Shukla <amitprakashs@marvell.com>
> Cc: dev@dpdk.org; Jerin Jacob Kollanukkaran <jerinj@marvell.com>;
> david.marchand@redhat.com; bruce.richardson@intel.com;
> ciara.power@intel.com; dmitry.kozliuk@gmail.com
> Subject: [EXT] Re: [PATCH v7] mem: telemetry support for memseg and
> element information
> 
> External Email
> 
> ----------------------------------------------------------------------
> On 10/25/2022 2:02 PM, 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/memseg_lists
> > The command displays the memseg list from which the memory has been
> > allocated.
> > Example:
> > --> /eal/memseg_lists
> > {"/eal/memseg_lists": [0, 1]}
> >
> > 2. /eal/memseg_list_info,<memseg-list-id>
> > The command outputs the memsegs, from which the memory is allocated,
> > for the memseg_list given as input.
> > Example:
> > --> /eal/memseg_list_info,0
> > {"/eal/memseg_list_info": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, \
> >   12, 13, 14, 15]}
> >
> > 3. /eal/memseg_info,<memseg-list-id>,<memseg-id>
> > The command outputs the memseg information based on the memseg-list
> > and the memseg-id given as input.
> > Example:
> > --> /eal/memseg_info,0,10
> > {"/eal/memseg_info": {"Memseg_list_index": 0, \
> > "Memseg_index": 10, "Start_addr": "0x101600000", \
> > "End_addr": "0x101800000", "Size": 2097152, "Hugepage_size": 2097152,
> > \
> > "Socket_id": 0, "flags": 0}}
> >
> > --> /eal/memseg_info,0,15
> > {"/eal/memseg_info": {"Memseg_list_index": 0, "Memseg_index": 15, \
> > "Start_addr": "0x102000000", "End_addr": "0x102200000", \
> > "Size": 2097152, "Hugepage_size": 2097152, "Socket_id": 0, "flags":
> > 0}}
> >
> > 4. /eal/mem_element_list,<heap-id>,<memseg-list-id>,<memseg-id>
> > The command outputs number of elements in a memseg based on the
> > heap-id, memseg-list-id and memseg-id given as input.
> > Example:
> > --> /eal/mem_element_list,0,0,10
> > {"/eal/mem_element_list": {"Element_count": 52}}
> >
> > --> /eal/mem_element_list,0,1,15
> > {"/eal/mem_element_list": {"Element_count": 52}}
> >
> > 5. /eal/mem_element_info,<heap-id>,<memseg-list-id>,<memseg-id>,  \
> >     <elem-start-id>,<elem-end-id>
> > 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.
> > Example:
> > --> /eal/mem_element_info,0,0,15,1,2
> > {"/eal/mem_element_info": {"element_1": {"msl_id": 0, "ms_id": 15, \
> > "memseg_start_addr": "0x102000000", "memseg_end_addr":
> "0x102200000",
> > \
> > "element_start_addr": "0x102000b00", "element_end_addr":
> > "0x102003380", \
> > "element_size": 10368, "element_state": "Busy"}, "element_2": \
> > {"msl_id": 0, "ms_id": 15, "memseg_start_addr": "0x102000000", \
> > "memseg_end_addr": "0x102200000", "element_start_addr":
> "0x102003380",
> > \
> > "element_end_addr": "0x102005c00", "element_size": 10368, \
> > "element_state": "Busy"}, "Element_count": 2}}
> >
> > Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com>
> > ---
> 
> 
> 
> > +	ms_start_addr = ms->addr_64;
> > +	ms_end_addr = (uint64_t)RTE_PTR_ADD(ms_start_addr, ms->len);
> > +	ms_size = ms->len;
> > +	hugepage_size = ms->hugepage_sz;
> > +	ms_socket_id = ms->socket_id;
> > +	ms_flags = ms->flags;
> > +
> > +	rte_mcfg_mem_read_unlock();
> > +
> > +	rte_tel_data_start_dict(d);
> > +	rte_tel_data_add_dict_int(d, "Memseg_list_index", ms_list_idx);
> > +	rte_tel_data_add_dict_int(d, "Memseg_index", ms_idx);
> > +	snprintf(addr, ADDR_STR, "0x%"PRIx64, ms_start_addr);
> > +	rte_tel_data_add_dict_string(d, "Start_addr", addr);
> > +	snprintf(addr, ADDR_STR, "0x%"PRIx64, ms_end_addr);
> > +	rte_tel_data_add_dict_string(d, "End_addr", addr);
> > +	rte_tel_data_add_dict_u64(d, "Size", ms_size);
> > +	rte_tel_data_add_dict_u64(d, "Hugepage_size", hugepage_size);
> 
> Seems like rte_tel_data_add_dict_u64 is deprecated now.
> 
> I would also suggest outputting IOVA address for memsegs as well (unless it's
> set to RTE_BAD_IOVA, in which case it should say something meaningful
> too).
> 
> Otherwise (and with above changes), LGTM
> 
> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
> --
> Thanks,
> Anatoly


  reply	other threads:[~2023-05-17  9:08 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-19  6:30 [PATCH] " Amit Prakash Shukla
2022-05-19 12:42 ` David Marchand
2022-05-19 18:57 ` [PATCH v2] " Amit Prakash Shukla
2022-05-23 11:14   ` Bruce Richardson
2022-05-23 13:35     ` [EXT] " Amit Prakash Shukla
2022-05-23 13:43       ` Bruce Richardson
2022-05-24 10:30         ` Amit Prakash Shukla
2022-05-24 10:33 ` [PATCH v3] " Amit Prakash Shukla
2022-05-25 10:33 ` [PATCH v4 1/2] " Amit Prakash Shukla
2022-05-25 10:33   ` [PATCH v4 2/2] mem: telemetry support for system memory information Amit Prakash Shukla
2022-06-30  5:54     ` Amit Prakash Shukla
2022-07-21 11:21       ` Amit Prakash Shukla
2022-06-14 12:50   ` [PATCH v4 1/2] mem: telemetry support for memseg and element information Amit Prakash Shukla
2022-06-30  5:52     ` Amit Prakash Shukla
2022-07-21 11:20       ` Amit Prakash Shukla
2022-09-29  8:29   ` David Marchand
2022-09-29 11:30     ` [EXT] " Amit Prakash Shukla
2022-09-29 11:43   ` [PATCH v5 " Amit Prakash Shukla
2022-09-29 11:43     ` [PATCH v5 2/2] mem: telemetry support for system memory information Amit Prakash Shukla
2022-10-07 19:46       ` David Marchand
2022-10-11  7:10         ` [EXT] " Amit Prakash Shukla
2022-10-20 19:18           ` Dmitry Kozlyuk
2022-10-20 19:50             ` Stephen Hemminger
2022-10-06  7:07     ` [PATCH v5 1/2] mem: telemetry support for memseg and element information Amit Prakash Shukla
2022-10-07 19:52       ` David Marchand
2022-10-07 19:48     ` David Marchand
2022-10-11  7:22       ` [EXT] " Amit Prakash Shukla
2022-10-20 11:40     ` Dmitry Kozlyuk
2022-10-21 19:26       ` [EXT] " Amit Prakash Shukla
2022-10-21 20:07         ` Dmitry Kozlyuk
2022-10-25  7:25           ` Amit Prakash Shukla
2022-10-25 11:51     ` [PATCH v6] " Amit Prakash Shukla
2022-10-25 13:02       ` [PATCH v7] " Amit Prakash Shukla
2022-12-06 11:46         ` Amit Prakash Shukla
2023-01-30 10:18           ` Amit Prakash Shukla
2023-02-20 11:10         ` Thomas Monjalon
2023-02-28  7:30           ` [EXT] " Amit Prakash Shukla
2023-05-15 11:51             ` Amit Prakash Shukla
2023-05-16 10:47         ` Burakov, Anatoly
2023-05-17  9:08           ` Amit Prakash Shukla [this message]
2023-05-17  9:21         ` [PATCH v8] " Amit Prakash Shukla
2023-06-07 20:40           ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=PH0PR18MB5167CBC6D923D5F15A34EA53C87E9@PH0PR18MB5167.namprd18.prod.outlook.com \
    --to=amitprakashs@marvell.com \
    --cc=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=ciara.power@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=jerinj@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).