From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Anatoly Burakov <anatoly.burakov@intel.com>
Subject: Re: [dpdk-dev] [PATCH] mem: close rtemap files
Date: Mon, 19 Oct 2020 09:23:11 -0700 [thread overview]
Message-ID: <20201019092311.1cf170aa@hermes.local> (raw)
In-Reply-To: <20201019154235.17799-1-stephen@networkplumber.org>
On Mon, 19 Oct 2020 08:42:35 -0700
Stephen Hemminger <stephen@networkplumber.org> wrote:
> The memory subsystem is leaving open a file descriptor for each
> rtemap file. This can lead to hundreds of extra open file descriptors
> which has negative side effects. For example, the application may go
> over its maximum file descriptor limit, or the application may be using
> limited API's like select that only allow 1024 file descriptors.
>
> The EAL memory subsystem does not need to hold the file open.
> Probably the original intention was to keep the file locked, but that is
> not necessary. The Linux kernel keeps a reference count on the file,
> and the mmap counts is a reference and therefore maintains the file
> as locked.
>
> The fix is one line just close the file after it is setup.
>
> Fixes: 582bed1e1d1d ("mem: support mapping hugepages at runtime")
> Cc: anatoly.burakov@intel.com
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This is fixes the open files, but has issues on shutdown.
Will send new version later.
prev parent reply other threads:[~2020-10-19 16:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-19 15:42 Stephen Hemminger
2020-10-19 16:23 ` 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=20201019092311.1cf170aa@hermes.local \
--to=stephen@networkplumber.org \
--cc=anatoly.burakov@intel.com \
--cc=dev@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).