DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Fengnan Chang <changfengnan@bytedance.com>
Cc: anatoly.burakov@intel.com, dev@dpdk.org, xuemingl@mellanox.com
Subject: Re: [PATCH] eal: speed up dpdk init time
Date: Wed, 29 May 2024 14:51:37 -0700	[thread overview]
Message-ID: <20240529145137.58dabd74@hermes.local> (raw)
In-Reply-To: <20240528061259.29528-1-changfengnan@bytedance.com>

On Tue, 28 May 2024 14:12:59 +0800
Fengnan Chang <changfengnan@bytedance.com> wrote:

> If we have a lot of huge pages in system, the memory init will
> cost long time in legacy-mem mode. For example, we have 120G memory
> in unit of 2MB hugepage, the env init will cost 43s. Almost half
> of time spent on find_numasocket, since the address in
> /proc/self/numa_maps is orderd, we can sort hugepg_tbl by orig_va
> first and then just read numa_maps line by line is enough to find
> socket. In my test, spent time reduced to 19s.
> 
> Signed-off-by: Fengnan Chang <changfengnan@bytedance.com>
> ---

Good speed up, but you could do much better if the code only read
/proc/self/numa_maps once and constructed an internal table.
Could use a hash or tree to store the relatively small table.

      reply	other threads:[~2024-05-29 21:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-28  6:12 Fengnan Chang
2024-05-29 21:51 ` Stephen Hemminger [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=20240529145137.58dabd74@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=anatoly.burakov@intel.com \
    --cc=changfengnan@bytedance.com \
    --cc=dev@dpdk.org \
    --cc=xuemingl@mellanox.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).