From: Petri Latvala <petri.latvala@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: igt-dev@lists.freedesktop.org,
Lucas De Marchi <lucas.demarchi@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t] lib: Use nr_open not file-max for setting fd rlimit
Date: Tue, 9 Apr 2019 12:06:02 +0300 [thread overview]
Message-ID: <20190409090602.GE22949@platvala-desk.ger.corp.intel.com> (raw)
In-Reply-To: <20190408213602.31554-1-chris@chris-wilson.co.uk>
On Mon, Apr 08, 2019 at 10:36:02PM +0100, Chris Wilson wrote:
> Petri pointed out that the maximum allowed number of files per process
> is nr_open, not the system cap of file-max.
>
> Suggested-by: Petri Latvala <petri.latvala@intel.com>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> Cc: Petri Latvala <petri.latvala@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110351
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
> ---
> lib/igt_aux.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/igt_aux.c b/lib/igt_aux.c
> index 266aa8321..02f4defb6 100644
> --- a/lib/igt_aux.c
> +++ b/lib/igt_aux.c
> @@ -1595,7 +1595,7 @@ bool igt_allow_unlimited_files(void)
> struct rlimit rlim;
> unsigned nofile_rlim = 1024*1024;
>
> - FILE *file = fopen("/proc/sys/fs/file-max", "r");
> + FILE *file = fopen("/proc/sys/fs/nr_open", "r");
> if (file) {
> igt_assert(fscanf(file, "%u", &nofile_rlim) == 1);
> igt_info("System limit for open files is %u\n", nofile_rlim);
> --
> 2.20.1
>
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
prev parent reply other threads:[~2019-04-09 9:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-08 21:36 [igt-dev] [PATCH i-g-t] lib: Use nr_open not file-max for setting fd rlimit Chris Wilson
2019-04-08 22:42 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-04-09 4:15 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-04-09 9:06 ` Petri Latvala [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=20190409090602.GE22949@platvala-desk.ger.corp.intel.com \
--to=petri.latvala@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=igt-dev@lists.freedesktop.org \
--cc=lucas.demarchi@intel.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