All of lore.kernel.org
 help / color / mirror / Atom feed
From: "lihuisong (C)" <lihuisong@huawei.com>
To: "Morten Brørup" <mb@smartsharesystems.com>, dev@dpdk.org
Cc: <stephen@networkplumber.org>
Subject: Re: [PATCH v3] mempool: dump includes list of memory chunks
Date: Tue, 11 Jun 2024 19:27:17 +0800	[thread overview]
Message-ID: <560c5279-53a8-92e2-01bd-9906ee96d476@huawei.com> (raw)
In-Reply-To: <20240611065114.13395-1-mb@smartsharesystems.com>


在 2024/6/11 14:51, Morten Brørup 写道:
> Added information about the memory chunks holding the objects in the
> mempool when dumping the status of the mempool to a file.
>
> Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
> Acked-by: Paul Szczepanek <paul.szczepanek@arm.com>
> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
> ---
> v3:
> * Fix output indentation.
> * Print in existing loop, instead of adding a new loop.
> v2:
> * Dump one line per entry. Remove index number and headline.
>    (Stephen, Konstantin.)
> * Changed reviewed-by to acked-by.
> ---
>   lib/mempool/rte_mempool.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/lib/mempool/rte_mempool.c b/lib/mempool/rte_mempool.c
> index 12390a2c81..7ab1fcb480 100644
> --- a/lib/mempool/rte_mempool.c
> +++ b/lib/mempool/rte_mempool.c
> @@ -1257,8 +1257,11 @@ rte_mempool_dump(FILE *f, struct rte_mempool *mp)
>   	ops = rte_mempool_get_ops(mp->ops_index);
>   	fprintf(f, "  ops_name: <%s>\n", (ops != NULL) ? ops->name : "NA");
>   
> -	STAILQ_FOREACH(memhdr, &mp->mem_list, next)
> +	STAILQ_FOREACH(memhdr, &mp->mem_list, next) {
> +		fprintf(f, "  memory chunk at %p, addr=%p, iova=0x%" PRIx64 ", len=%zu\n",
> +				memhdr, memhdr->addr, memhdr->iova, memhdr->len);
>   		mem_len += memhdr->len;
> +	}
>   	if (mem_len != 0) {
>   		fprintf(f, "  avg bytes/object=%#Lf\n",
>   			(long double)mem_len / mp->size);
Acked-by: Huisong Li<lihuisong@huawei.com>

  reply	other threads:[~2024-06-11 11:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-16  8:59 [PATCH] mempool: dump includes list of memory chunks Morten Brørup
2024-05-16 15:20 ` Stephen Hemminger
2024-05-17  7:29   ` Morten Brørup
2024-05-29 12:55 ` Paul Szczepanek
2024-05-29 14:03   ` Morten Brørup
2024-06-10  9:13 ` Morten Brørup
2024-06-10 11:56 ` Andrew Rybchenko
2024-06-10 13:44 ` Konstantin Ananyev
2024-06-10 14:51   ` Morten Brørup
2024-06-10 16:28     ` Konstantin Ananyev
2024-06-11  6:38 ` [PATCH v2] " Morten Brørup
2024-06-11  6:50 ` Morten Brørup
2024-06-11  6:51 ` [PATCH v3] " Morten Brørup
2024-06-11 11:27   ` lihuisong (C) [this message]
2024-06-14 14:10   ` 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=560c5279-53a8-92e2-01bd-9906ee96d476@huawei.com \
    --to=lihuisong@huawei.com \
    --cc=dev@dpdk.org \
    --cc=mb@smartsharesystems.com \
    --cc=stephen@networkplumber.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.