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 40D5442C54; Wed, 7 Jun 2023 22:40:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C78B541611; Wed, 7 Jun 2023 22:40:25 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 14ABD410D0 for ; Wed, 7 Jun 2023 22:40:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686170424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lik4Sep9ok8M9f6dwIZPWgsGngBpPQ61h+eiUdYpPFI=; b=WTdb1T810i0+yjItK5wdK08Hmuswmsh4CRMX1vXLYcXj7us7PJWVQSOex2/mEQunvb/5KW f2MS/4jXSJjZ40xwbIHtjxxYjwZScan0VImiuqMAtgmnNAzhENKVZx1wPcf8Zt7rlA5MmW weRUSg0MmwQOw2jWFJE8z1+bukc7O2g= Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-192-7yhVt4GiP8K_Fv406Wxi0w-1; Wed, 07 Jun 2023 16:40:23 -0400 X-MC-Unique: 7yhVt4GiP8K_Fv406Wxi0w-1 Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-259a3c7fe26so635023a91.1 for ; Wed, 07 Jun 2023 13:40:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686170422; x=1688762422; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lik4Sep9ok8M9f6dwIZPWgsGngBpPQ61h+eiUdYpPFI=; b=Vhp7KFxQQbQXGd+fU50gzY64hj7KrDA0HGc1FY8jrIOdFMTuw6cd0m5rCZqd//CW3Q LvoR3/OhDPrnEXe/jjeTdhYpqkYydgkWPDWCxqjL0TnATC/sk1NhgzBGzj3nbOyQNek8 ky8GEGgWSO2KLOi7GFPGKP0Xc/m7N8T0smTTX3cmPIghOFRO0k/ZrbFMY79ZRzq7qDQH KRrGZnRQvkjAQ8SotmVS6VasxXSa/F49+3yCoZwe3GWFn09kJ8g0vBrGj9PZSePBY9Dd Yf5KW9auikywqTntROFHzT4YKdN2kZmLZRsbskZS48rLX207fAT+AUCPaLW5dk33Ye0k l1nQ== X-Gm-Message-State: AC+VfDwHqkWbeE19cDuhyPVV3uVUAbrKReVyKw04CIKH/dOeuBJnIecj Sz7f3xCl699j8XAYjTdU4GJc4I+MJwvGkRT6NY2kpybsQcKJqNTsMeL5BKg63Y499XGB5wliDqQ w2khmRDJEe3wfKipbkVg= X-Received: by 2002:a17:90a:7acb:b0:24e:688:30f8 with SMTP id b11-20020a17090a7acb00b0024e068830f8mr2269504pjl.49.1686170421900; Wed, 07 Jun 2023 13:40:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4K9FGDp/5OHltSM6zqncs5GPsmlGmYnM3TwjaNE7w/39H1VLLJ1d/9FWTsYxJCBfHBmZVDcOo8xD+FGAQAd9c= X-Received: by 2002:a17:90a:7acb:b0:24e:688:30f8 with SMTP id b11-20020a17090a7acb00b0024e068830f8mr2269492pjl.49.1686170421569; Wed, 07 Jun 2023 13:40:21 -0700 (PDT) MIME-Version: 1.0 References: <20221025130216.4141896-1-amitprakashs@marvell.com> <20230517092158.1679036-1-amitprakashs@marvell.com> In-Reply-To: <20230517092158.1679036-1-amitprakashs@marvell.com> From: David Marchand Date: Wed, 7 Jun 2023 22:40:10 +0200 Message-ID: Subject: Re: [PATCH v8] mem: telemetry support for memseg and element information To: Amit Prakash Shukla Cc: anatoly.burakov@intel.com, dev@dpdk.org, jerinj@marvell.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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, May 17, 2023 at 11:22=E2=80=AFAM 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 > ] > } > > 2. /eal/memseg_list_info, > 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 > ] > } > > 3. /eal/memseg_info,, > The command outputs the memseg information based on the > memseg-list and the memseg-id given as input. > Example: > --> /eal/memseg_info,0,5 > { > "/eal/memseg_info": { > "Memseg_list_index": 0, > "Memseg_index": 5, > "IOVA_addr": "0x1c0000000", > "Start_addr": "0x1c0000000", > "End_addr": "0x1e0000000", > "Size": 536870912, > "Hugepage_size": 536870912, > "Socket_id": 0, > "flags": 0 > } > } > > --> /eal/memseg_info,0,1 > { > "/eal/memseg_info": { > "Memseg_list_index": 0, > "Memseg_index": 1, > "IOVA_addr": "0x140000000", > "Start_addr": "0x140000000", > "End_addr": "0x160000000", > "Size": 536870912, > "Hugepage_size": 536870912, > "Socket_id": 0, > "flags": 0 > } > } > > 4. /eal/mem_element_list,,, > 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,5 > { > "/eal/mem_element_list": { > "Element_count": 2 > } > } > > --> /eal/mem_element_list,0,0,1 > { > "/eal/mem_element_list": { > "Element_count": 52 > } > } > > 5. /eal/mem_element_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. > Example: > --> /eal/mem_element_info,0,0,4,1,2 > { > "/eal/mem_element_info": { > "element_1": { > "msl_id": 0, > "ms_id": 4, > "memseg_start_addr": "0x1a0000000", > "memseg_end_addr": "0x1c0000000", > "element_start_addr": "0x1a01fe680", > "element_end_addr": "0x1a0bfe700", > "element_size": 10485888, > "element_state": "Busy" > }, > "element_2": { > "msl_id": 0, > "ms_id": 4, > "memseg_start_addr": "0x1a0000000", > "memseg_end_addr": "0x1c0000000", > "element_start_addr": "0x1a0bfe700", > "element_end_addr": "0x1a15fe780", > "element_size": 10485888, > "element_state": "Busy" > }, > "Element_count": 2 > } > } > > Signed-off-by: Amit Prakash Shukla > Acked-by: Anatoly Burakov Applied, thanks. --=20 David Marchand