From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: Alejandro Lucero <alejandro.lucero@netronome.com>
Cc: dev <dev@dpdk.org>,
stable@dpdk.org, Maxime Coquelin <maxime.coquelin@redhat.com>
Subject: Re: [dpdk-stable] [PATCH 4/6] mem: use address hint for mapping hugepages
Date: Tue, 3 Jul 2018 11:46:51 +0100 [thread overview]
Message-ID: <a5d74c8e-7f4b-20ec-cd5d-b297ba040e81@intel.com> (raw)
In-Reply-To: <CAD+H990Zx1zWMnKA3MLD8TAz47B0C1SDeR2du-C2E+kVCr_b+w@mail.gmail.com>
On 03-Jul-18 11:44 AM, Alejandro Lucero wrote:
>
> + addr = mmap(addr_hint,
> (*size) + hugepage_sz, PROT_READ,
> #ifdef RTE_ARCH_PPC_64
> MAP_PRIVATE | MAP_ANONYMOUS |
> MAP_HUGETLB,
> @@ -286,8 +312,14 @@
> MAP_PRIVATE,
> #endif
> fd, 0);
> - if (addr == MAP_FAILED)
> + if (addr == MAP_FAILED) {
> + /* map failed. Let's try with less memory */
> *size -= hugepage_sz;
> + } else if (addr_hint && addr != addr_hint) {
> + /* map not using hint. Let's try with
> another offset */
>
>
> Comment is slightly misleading - "map not using hint" implies we are
> about to map something without using hint. Suggested rewording:
>
> suggested address hint was not used, try with another offset
>
>
> What about "hint was not used. Try with another offset" ?
Works for me :)
--
Thanks,
Anatoly
next prev parent reply other threads:[~2018-07-03 10:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-02 17:26 [dpdk-stable] [PATH 0/6] Use IOVAs check based on DMA mask Alejandro Lucero
2018-07-02 17:26 ` [dpdk-stable] [PATCH 1/6] mem: add function for checking memsegs IOVAs addresses Alejandro Lucero
2018-07-03 9:07 ` Burakov, Anatoly
2018-07-03 10:01 ` Alejandro Lucero
2018-07-02 17:26 ` [dpdk-stable] [PATCH 2/6] ethdev: add function for checking IOVAs by a device Alejandro Lucero
2018-07-02 17:27 ` [dpdk-stable] [PATCH 3/6] bus/pci: use IOVAs check when setting IOVA mode Alejandro Lucero
2018-07-03 9:10 ` Burakov, Anatoly
2018-07-03 10:08 ` Alejandro Lucero
2018-07-02 17:27 ` [dpdk-stable] [PATCH 4/6] mem: use address hint for mapping hugepages Alejandro Lucero
2018-07-03 9:17 ` Burakov, Anatoly
2018-07-03 10:44 ` Alejandro Lucero
2018-07-03 10:46 ` Burakov, Anatoly [this message]
2018-07-02 17:27 ` [dpdk-stable] [PATCH 5/6] net/nfp: check hugepages IOVAs based on DMA mask Alejandro Lucero
2018-07-02 17:27 ` [dpdk-stable] [PATCH 6/6] net/nfp: support IOVA VA mode Alejandro Lucero
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=a5d74c8e-7f4b-20ec-cd5d-b297ba040e81@intel.com \
--to=anatoly.burakov@intel.com \
--cc=alejandro.lucero@netronome.com \
--cc=dev@dpdk.org \
--cc=maxime.coquelin@redhat.com \
--cc=stable@dpdk.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 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).