aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-sched.c
diff options
context:
space:
mode:
authorEirik Fuller <efuller@redhat.com>2021-06-25 22:38:25 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2021-08-02 10:01:54 -0300
commit880569296fb8989516be0492eb304cb88c879e5c (patch)
tree2a89f6801533b4d20f1f6bab10cc99a6a9cb03f1 /tools/perf/builtin-sched.c
parentperf vendor events intel: Add basic metrics for Elkhartlake (diff)
downloadlinux-dev-880569296fb8989516be0492eb304cb88c879e5c.tar.xz
linux-dev-880569296fb8989516be0492eb304cb88c879e5c.zip
perf test: Handle fd gaps in test__dso_data_reopen
https://github.com/beaker-project/restraint/issues/215 describes a file descriptor leak which revealed the test failure described here. The 'DSO data reopen' perf test assumes that RLIMIT_NOFILE limits the number of open file descriptors, but it actually limits newly opened file descriptors. When the file descriptor limit is reduced, file descriptors already open remain open regardless of the new limit. This test failure does not occur if open file descriptors are contiguous, beginning at zero. The following command triggers this perf test failure. perf test 'DSO data reopen' 3>/dev/null 8>/dev/null This patch determines the file descriptor limit by opening four files and then closing them. The limit is set to the fourth file descriptor, leaving only the first three available because any newly opened file descriptor must be less than the limit. Signed-off-by: Eirik Fuller <efuller@redhat.com> Acked-by: Jiri Olsa <jolsa@redhat.com> Acked-by: Michael Petlan <mpetlan@redhat.com> LPU-Reference: 20210626023825.1398547-1-efuller@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-sched.c')
0 files changed, 0 insertions, 0 deletions