DPDK-dev Archive on lore.kernel.org
 help / color / Atom feed
From: Gagandeep Singh <G.Singh@nxp.com>
To: David Marchand <david.marchand@redhat.com>
Cc: dev <dev@dpdk.org>, Thomas Monjalon <thomas@monjalon.net>,
	"Burakov, Anatoly" <anatoly.burakov@intel.com>,
	Olivier Matz <olivier.matz@6wind.com>,
	Andrew Rybchenko <arybchenko@solarflare.com>,
	Nipun Gupta <nipun.gupta@nxp.com>,
	Steve Capper <Steve.Capper@arm.com>
Subject: Re: [dpdk-dev] [PATCH] eal: change max hugepage sizes to 4
Date: Wed, 7 Aug 2019 12:47:06 +0000
Message-ID: <AM0PR04MB6356ABD6ACD7E26DD732B511E1D40@AM0PR04MB6356.eurprd04.prod.outlook.com> (raw)

> On Wed, Aug 7, 2019 at 12:26 PM Gagandeep Singh <g.singh@nxp.com> wrote:
> >
> > DPDK currently is supporting maximum 3 hugepage,
> > sizes whereas system can support more than this e.g.
> > 64K, 2M, 32M and 1G.
> You can mention ARM platform here, and that this issue starts with
> kernel 5.2 (and I would try to mention this in the title as well).
> This is better than an annotation that will be lost.
> > Having these four hugepage sizes available to use by DPDK,
> > which is valid in case of '--in-memory' EAL option or
> > using 4 separate mount points for each hugepage size;
> > hugepage_info_init() API reports an error.
> Can you describe what is the impact from a user point of view rather
> than mentioning this internal function?
> > This change increases the maximum supported mount points
> > to 4.
> I suppose this fix does the trick for you.
> However, we are in internal structures and I can't think of an impact
> on datapath.
> So we might as well use dynamic allocations rather than just enlarge this array.
> Did you consider this?
Yes, we have thought about it, but that would mean a lot more testing is required for all supported kernel or may be on some stacks as well.
MAX_HUGEPAGE_SIZES is set as a static value 3 since beginning while ARM (or may be some other platforms) is supporting 4 sizes since very long.

The value of this macro has not changed from long. It is just a mismatch between what DPDK is supporting and what underneath hardware is supporting.
This issue is coming now because in kernel 5.2, kernel is making the directories by default (and not taking from the bootargs) for each hugepage sizes.
Here are the possible cases that we are aware of

For 64KB granule, the kernel supports the following huge page sizes:
        2MB     using 32 x 64KB pages which are contiguous
        512MB   using a level 2 block mapping (a pmd_t)
        16GB    using 32 x 512MB block mappings

For a 16KB granule, we have:
        2MB     using 128 x 16KB pages
        32MB    using a level 2 block mapping (a pmd_t)
        1GB     using 32 x 32MB block mappings

For 4KB granule, we have:
        64KB    using 16 x 4KB pages
        2MB     using a level 2 block mapping (a pmd_t)
        32MB    using 16 x level 2 block mappings
        1GB     using a level 1 block mapping (a pud_t)

And using the static value of 4, it should cover all cases.

> --
> David Marchand

             reply index

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-07 12:47 Gagandeep Singh [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-08-08  9:00 Gagandeep Singh
2019-08-08  9:22 ` David Marchand
2019-08-07 12:53 Gagandeep Singh
2019-08-07 14:09 ` Honnappa Nagarahalli
2019-08-07 10:12 Gagandeep Singh
2019-08-07 12:00 ` David Marchand
2019-08-07 12:07   ` Thomas Monjalon
2019-08-07 13:28     ` Hemant Agrawal
2019-08-08  7:31       ` Thomas Monjalon
2019-08-12  9:43         ` Burakov, Anatoly
2019-08-12  9:49           ` David Marchand
2019-08-12 10:01             ` Thomas Monjalon
2019-08-12 10:38             ` Burakov, Anatoly
2019-08-08  7:33       ` David Marchand
2019-08-08 10:37         ` Hemant Agrawal
2019-08-08 12:29           ` Steve Capper
2019-08-08 12:39             ` David Marchand
2019-08-12  9:42       ` Burakov, Anatoly
2019-08-07 15:27 ` Stephen Hemminger

Reply instructions:

You may reply publically 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:

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

  git send-email \
    --in-reply-to=AM0PR04MB6356ABD6ACD7E26DD732B511E1D40@AM0PR04MB6356.eurprd04.prod.outlook.com \
    --to=g.singh@nxp.com \
    --cc=Steve.Capper@arm.com \
    --cc=anatoly.burakov@intel.com \
    --cc=arybchenko@solarflare.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=nipun.gupta@nxp.com \
    --cc=olivier.matz@6wind.com \
    --cc=thomas@monjalon.net \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK-dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dpdk-dev/0 dpdk-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dpdk-dev dpdk-dev/ https://lore.kernel.org/dpdk-dev \
	public-inbox-index dpdk-dev

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git