public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] lib: Use nr_open not file-max for setting fd rlimit
@ 2019-04-08 21:36 Chris Wilson
  2019-04-08 22:42 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chris Wilson @ 2019-04-08 21:36 UTC (permalink / raw)
  To: igt-dev; +Cc: Lucas De Marchi, Petri Latvala

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>
---
 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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-04-09  9:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [igt-dev] [PATCH i-g-t] " Petri Latvala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox