From: David Marchand <david.marchand@redhat.com>
To: Roy Shterman <roy.shterman@vastdata.com>
Cc: dev <dev@dpdk.org>,
"Burakov, Anatoly" <anatoly.burakov@intel.com>,
Yuval Mintz <yuval@vastdata.com>,
Aviv Ben David <aviv.bendavid@vastdata.com>,
dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] mem: fix free segment when using huge-unlink option
Date: Wed, 7 Apr 2021 11:09:46 +0200 [thread overview]
Message-ID: <CAJFAV8xKWTxxS7HUVPKvjDzhemx35ryQyLyBqhty5E3TwimfVQ@mail.gmail.com> (raw)
In-Reply-To: <63d59764-3a86-6b7d-97c3-28a8d1a6eebb@intel.com>
On Thu, Apr 1, 2021 at 1:07 PM Burakov, Anatoly
<anatoly.burakov@intel.com> wrote:
>
> On 22-Feb-21 10:41 AM, Roy Shterman wrote:
> > When using huge_unlink we unlink the segment right
> > after allocation. Although we unlink the file we keep
> > the fd in fd_list so file still exist just the path deleted.
> > When freeing the hugepage we need to close the fd and assign
> > it with (-1) in fd_list for the page to be released.
> >
> > The current flow fails rte_malloc in the following flow when working
> > with --huge-unlink option:
> > 1. alloc_seg() for segment A -
> > We allocate segment, unlink the path to the segment
> > and keep the file descriptor in fd_list.
> > 2. free_seg() for segment A -
> > We clear the segment metadata and return - without closing fd
> > or assigning (-1) in fd list.
> > 3. alloc_seg() for segment A again -
> > We find segment A as available, try to allocate it,
> > find the old fd in fd_list try to unlink it
> > as part of alloc_seg() but failed because path doesn't exist.
> >
> > The impact of such error is falsly failing rte_malloc()
falsely*
> > although we have hugepages available.
> >
> > Fixes: d435aad37da7 ("mem: support --huge-unlink mode")
Cc: stable@dpdk.org
> >
> > Signed-off-by: Roy Shterman <roy.shterman@vastdata.com>
> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Applied, thanks.
--
David Marchand
prev parent reply other threads:[~2021-04-07 9:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210222104131.11979-1-roy.shterman@vastdata.com>
[not found] ` <ba9df18a-036f-dbd4-b19f-2f5faec43acc@intel.com>
[not found] ` <CAJ5KnGAWmNnWdSrzyGF2hfxYJrUEn_df8SWn1yKhG_swBrivOw@mail.gmail.com>
2021-03-01 10:44 ` [dpdk-stable] " Burakov, Anatoly
2021-03-25 13:34 ` David Marchand
[not found] ` <63d59764-3a86-6b7d-97c3-28a8d1a6eebb@intel.com>
2021-04-07 9:09 ` David Marchand [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=CAJFAV8xKWTxxS7HUVPKvjDzhemx35ryQyLyBqhty5E3TwimfVQ@mail.gmail.com \
--to=david.marchand@redhat.com \
--cc=anatoly.burakov@intel.com \
--cc=aviv.bendavid@vastdata.com \
--cc=dev@dpdk.org \
--cc=roy.shterman@vastdata.com \
--cc=stable@dpdk.org \
--cc=yuval@vastdata.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).