DPDK patches and discussions
 help / color / mirror / Atom feed
From: John Romein <romein@astron.nl>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Slava Ovsiienko <viacheslavo@nvidia.com>,
	Aaron Conole <aconole@redhat.com>, "dev@dpdk.org" <dev@dpdk.org>,
	Raslan Darawsheh <rasland@nvidia.com>,
	Elena Agostini <eagostini@nvidia.com>,
	Dmitry Kozlyuk <dkozlyuk@nvidia.com>,
	Matan Azrad <matan@nvidia.com>, Ori Kam <orika@nvidia.com>,
	Suanming Mou <suanmingm@nvidia.com>
Subject: Re: [PATCH v2] common/mlx5: Optimize mlx5 mempool get extmem
Date: Mon, 7 Oct 2024 14:47:27 +0200	[thread overview]
Message-ID: <ddef72d2-9514-410b-8b63-7d58edea10a3@astron.nl> (raw)
In-Reply-To: <20241004151608.478a2859@hermes.local>

[-- Attachment #1: Type: text/plain, Size: 1698 bytes --]

Dear Stephen,

The problem has not been solved, but I found a workaround. According to 
the documentation (https://doc.dpdk.org/guides/prog_guide/gpudev.html, 
sec 11.3), rte_extmem_register should be invoked with GPU_PAGE_SIZE as 
an argument.  If GPU_PAGE_SIZE is set to 2 MB instead of 64 kB, 
registration of 72 GB of GPU memory (on a Grace Hopper) is done in about 
ten seconds, not hours.

   rte_extmem_register(ext_mem.buf_ptr, ext_mem.buf_len, NULL, ext_mem.buf_iova, GPU_PAGE_SIZE);


Thanks,  John Romein

On 05-10-2024 00:16, Stephen Hemminger wrote:
> On Wed, 1 Nov 2023 22:21:16 +0100
> John Romein<romein@astron.nl> wrote:
>
>> Dear Slava,
>>
>> Thank you for looking at the patch.  With the original code, I saw that
>> the application spent literally hours in this function during program
>> start up, if tens of gigabytes of GPU memory are registered.  This was
>> due to qsort being invoked for every new added item (to keep the list
>> sorted).  So I tried to write equivalent code that sorts the list only
>> once, after all items were added.  At least for our application, this
>> works well and is /much/ faster, as the complexity decreased from n^2
>> log(n) to n log(n).  But I must admit that I have no idea /what/ is
>> being sorted, or why; I only understand this isolated piece of code (or
>> at least I think so).  So if you think there are better ways to
>> initialize the list, then I am sure you will be absolutely right.  But I
>> will not be able to implement this, as I do not understand the full
>> context of the code.
>>
>> Kind Regards,  John
> Looks like the problem remains but patch has been sitting around for 11 months.
> Was this resolved?



[-- Attachment #2: Type: text/html, Size: 2887 bytes --]

      reply	other threads:[~2024-10-07 12:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-26 20:59 [PATCH] " Aaron Conole
2023-10-10 14:38 ` [PATCH v2] " Aaron Conole
2023-11-01  8:29   ` Slava Ovsiienko
2023-11-01 21:21     ` John Romein
2024-10-04 22:16       ` Stephen Hemminger
2024-10-07 12:47         ` John Romein [this message]

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=ddef72d2-9514-410b-8b63-7d58edea10a3@astron.nl \
    --to=romein@astron.nl \
    --cc=aconole@redhat.com \
    --cc=dev@dpdk.org \
    --cc=dkozlyuk@nvidia.com \
    --cc=eagostini@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=stephen@networkplumber.org \
    --cc=suanmingm@nvidia.com \
    --cc=viacheslavo@nvidia.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).