From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Michael Petlan <mpetlan@redhat.com>
Cc: vmolnaro@redhat.com, linux-perf-users@vger.kernel.org, acme@redhat.com
Subject: Re: [PATCH v2] perf test record.sh: Raise limit of open file descriptors
Date: Mon, 12 Aug 2024 10:16:10 -0300 [thread overview]
Message-ID: <ZroLGg6W9DKsexpp@x1> (raw)
In-Reply-To: <alpine.LRH.2.20.2405211127360.4040@Diego>
On Tue, May 21, 2024 at 11:27:56AM +0200, Michael Petlan wrote:
> On Mon, 29 Apr 2024, vmolnaro@redhat.com wrote:
> > From: Veronika Molnarova <vmolnaro@redhat.com>
> >
> > Subtest for system-wide record with '--threads=cpu' option fails due
> > to a limit of open file descriptors on systems with 128 or more CPUs
> > as the default limit is set to 1024.
> >
> > The number of open file descriptors should be slightly above
> > nmb_events*nmb_cpus + nmb_cpus(for perf.data.n) + 4*nmb_cpus(for pipes),
> > which equals 8*nmb_cpus. Therefore, temporarily raise the limit to
> > 16*nmb_cpus for the test.
> >
> > Signed-off-by: Veronika Molnarova <vmolnaro@redhat.com>
>
> Acked-by: Michael Petlan <mpetlan@redhat.com>
b4 got confused, I'll pick the rigth version manually...
⬢[acme@toolbox perf-tools-next]$ b4 am -ctsl --cc-trailers 20240429085721.10122-1-vmolnaro@redhat.com
Grabbing thread from lore.kernel.org/all/20240429085721.10122-1-vmolnaro@redhat.com/t.mbox.gz
Checking for newer revisions
Grabbing search results from lore.kernel.org
Analyzing 7 messages in the thread
WARNING: duplicate messages found at index 1
Subject 1: perf test record.sh: Raise limit of open file descriptors
Subject 2: perf test record.sh: Raise limit of open file descriptors
2 is not a reply... assume additional patch
Looking for additional code-review trailers on lore.kernel.org
Will use the latest revision: v2
You can pick other revisions using the -vN flag
Checking attestation on all messages, may take a moment...
---
✓ [PATCH v2] perf test record.sh: Raise limit of open file descriptors
+ Link: https://lore.kernel.org/r/20240311081127.7652-1-vmolnaro@redhat.com (✓ DKIM/kernel.org)
+ Acked-by: Michael Petlan <mpetlan@redhat.com> (✓ DKIM/redhat.com)
+ Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
✓ [PATCH v2] perf test record.sh: Raise limit of open file descriptors
+ Acked-by: Michael Petlan <mpetlan@redhat.com> (✓ DKIM/redhat.com)
+ Link: https://lore.kernel.org/r/20240429085721.10122-1-vmolnaro@redhat.com
+ Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
✓ Signed: DKIM/redhat.com
---
Total patches: 2
---
Link: https://lore.kernel.org/r/20240311081127.7652-1-vmolnaro@redhat.com
Base: not specified
git am ./v2_20240311_vmolnaro_perf_test_record_sh_raise_limit_of_open_file_descriptors.mbx
⬢[acme@toolbox perf-tools-next]$
> > ---
> > Reworked the patch as the testfile has already changed since the patch
> > was sent causing the applying to fail, now applying upstream without
> > problems.
> > tools/perf/tests/shell/record.sh | 17 +++++++++++++++++
> > 1 file changed, 17 insertions(+)
> >
> > diff --git a/tools/perf/tests/shell/record.sh b/tools/perf/tests/shell/record.sh
> > index 3d1a7759a7b2..344c0e40ebe8 100755
> > --- a/tools/perf/tests/shell/record.sh
> > +++ b/tools/perf/tests/shell/record.sh
> > @@ -21,6 +21,15 @@ testprog="perf test -w thloop"
> > cpu_pmu_dir="/sys/bus/event_source/devices/cpu*"
> > br_cntr_file="/caps/branch_counter_nr"
> > br_cntr_output="branch stack counters"
> > +default_fd_limit=$(ulimit -n)
> > +# With option --threads=cpu the number of open file descriptors should be
> > +# equal to sum of: nmb_cpus * nmb_events (2+dummy),
> > +# nmb_threads for perf.data.n (equal to nmb_cpus) and
> > +# 2*nmb_cpus of pipes = 4*nmb_cpus (each pipe has 2 ends)
> > +# All together it needs 8*nmb_cpus file descriptors plus some are also used
> > +# outside of testing, thus raising the limit to 16*nmb_cpus
> > +min_fd_limit=$(($(getconf _NPROCESSORS_ONLN) * 16))
> > +
> >
> > cleanup() {
> > rm -rf "${perfdata}"
> > @@ -190,11 +199,19 @@ test_branch_counter() {
> > echo "Basic branch counter test [Success]"
> > }
> >
> > +# raise the limit of file descriptors to minimum
> > +if [[ $default_fd_limit -lt $min_fd_limit ]]; then
> > + ulimit -n $min_fd_limit
> > +fi
> > +
> > test_per_thread
> > test_register_capture
> > test_system_wide
> > test_workload
> > test_branch_counter
> >
> > +# restore the default value
> > +ulimit -n $default_fd_limit
> > +
> > cleanup
> > exit $err
> > --
> > 2.43.0
> >
> >
>
next prev parent reply other threads:[~2024-08-12 13:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-11 8:11 [PATCH v2] perf test record.sh: Raise limit of open file descriptors vmolnaro
2024-03-20 12:14 ` Michael Petlan
2024-03-20 14:19 ` Arnaldo Carvalho de Melo
2024-03-28 15:46 ` [PATCH] " vmolnaro
2024-04-25 19:00 ` [PATCH v2] " Arnaldo Carvalho de Melo
2024-04-29 8:53 ` vmolnaro
2024-05-21 9:27 ` Michael Petlan
2024-08-12 13:16 ` Arnaldo Carvalho de Melo [this message]
2024-08-12 13:21 ` Arnaldo Carvalho de Melo
2024-08-12 17:02 ` Arnaldo Carvalho de Melo
-- strict thread matches above, loose matches on Subject: below --
2023-11-30 21:42 vmolnaro
2024-01-24 14:31 ` Michael Petlan
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=ZroLGg6W9DKsexpp@x1 \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=mpetlan@redhat.com \
--cc=vmolnaro@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.