DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: "Burakov, Anatoly" <anatoly.burakov@intel.com>
Cc: dev <dev@dpdk.org>, Maxime Coquelin <maxime.coquelin@redhat.com>,
	 Sebastian Scheinkman <sscheink@redhat.com>,
	dpdk stable <stable@dpdk.org>, Aaron Conole <aconole@redhat.com>
Subject: Re: [dpdk-dev] [PATCH] eal/linux: fix memory allocations in containers+SELinux
Date: Thu, 17 Sep 2020 15:47:28 +0200	[thread overview]
Message-ID: <CAJFAV8zxm=jNLc+nPt74ZzUp5_-dF9OV=ptfBH5yNZg8EKzJ=A@mail.gmail.com> (raw)
In-Reply-To: <ed178637-e82c-5aab-8094-f9ed60140160@intel.com>

On Fri, Sep 11, 2020 at 2:46 PM Burakov, Anatoly
<anatoly.burakov@intel.com> wrote:
> > Removing hugepage files is done in multiple places and the memory
> > allocation code is complex.
> > This fix tries to do the minimum and avoids touching other paths.
> >
> > If trying to remove the hugepage file before allocating a page fails,
> > the error is reported to the caller and the user will see a memory
> > allocation error log.
> >
> > Fixes: 582bed1e1d1d ("mem: support mapping hugepages at runtime")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > ---
> I believe only the primary will try to allocate new pages, but this only
> covers the page-per-file scenario. There's also legacy mem option (which
> would attempt to remove files prior to creating new ones - not sure if
> it's refused in that case), and single file segments option (which will
> mostly fallocate holes rather than delete files, but may still attempt
> to delete files - by the way, how does fallocate work with SELinux?).

This issue should only concern part of the memory allocator that deals
with "named files" backed hugepages.
I would focus on the code relying on eal_get_hugefile_path() and I
agree I might have missed the legacy-mem part.

For anonymous hugepages this should not matter.

David Marchand

  reply	other threads:[~2020-09-17 13:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-10 16:24 David Marchand
2020-09-11 12:46 ` Burakov, Anatoly
2020-09-17 13:47   ` David Marchand [this message]
2020-09-17 14:17     ` Burakov, Anatoly
2020-09-17 14:44       ` Aaron Conole
2020-09-17 14:47       ` David Marchand
2020-10-02  9:36         ` David Marchand
2020-10-02 12:12           ` Burakov, Anatoly
2020-10-05 23:13             ` Thomas Monjalon

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:

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

  git send-email \
    --in-reply-to='CAJFAV8zxm=jNLc+nPt74ZzUp5_-dF9OV=ptfBH5yNZg8EKzJ=A@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=aconole@redhat.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=sscheink@redhat.com \
    --cc=stable@dpdk.org \


* 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).