From: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 3/3] i915/gem_concurrent_all: fix swap subtest group
Date: Fri, 1 Apr 2022 08:14:35 +0200 [thread overview]
Message-ID: <YkaYS6qmjalb3zxp@zkempczy-mobl2> (raw)
In-Reply-To: <20220331163430.73167-4-kamil.konieczny@linux.intel.com>
On Thu, Mar 31, 2022 at 06:34:30PM +0200, Kamil Konieczny wrote:
> In error path in fixture add unlocking memory. In run_modes
> there is already another subtest group which will guard against
> igt_asserts or igt_requires, so do unpinning unconditionally
> without fixture.
>
> There are still some problems with the code, while we run swap
> subtest we will race between other programs using memory so we
> may still experience oom-kill during test. Second problem will be
> on test machines configured with no swap turned on or with swap
> size much smaller than RAM size.
>
> The problem was discovered by Zbigniew with running
> ./gem_concurrent_blit --run '16M*' on machine with no swap.
>
> Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
> Signed-off-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
> ---
> tests/i915/gem_concurrent_all.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/tests/i915/gem_concurrent_all.c b/tests/i915/gem_concurrent_all.c
> index 22c5d6ef..2b1788e1 100644
> --- a/tests/i915/gem_concurrent_all.c
> +++ b/tests/i915/gem_concurrent_all.c
> @@ -1995,6 +1995,7 @@ igt_main
> if (posix_memalign(&pinned, 4096, pin_sz) ||
> mlock(pinned, pin_sz) ||
> madvise(pinned, pin_sz, MADV_DONTFORK)) {
> + munlock(pinned, pin_sz);
> free(pinned);
> pinned = NULL;
> }
> @@ -2006,12 +2007,10 @@ igt_main
> }
> run_modes(name, c, modes, s, count);
>
> - igt_fixture {
> - if (pinned) {
> - munlock(pinned, pin_sz);
> - free(pinned);
> - pinned = NULL;
Eh, that gave us a couple of hours of debugging :/ Using igt_fixture
is a little bit tricky.
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
--
Zbigniew
> - }
> + if (pinned) {
> + munlock(pinned, pin_sz);
> + free(pinned);
> + pinned = NULL;
> }
> }
> }
> --
> 2.32.0
>
next prev parent reply other threads:[~2022-04-01 6:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-31 16:34 [igt-dev] [PATCH i-g-t 0/2] i915/gem_concurrent_all: Add no-reloc Kamil Konieczny
2022-03-31 16:34 ` [igt-dev] [PATCH i-g-t 1/3] lib/intel_batchbuffer: add create without relocs Kamil Konieczny
2022-04-01 6:10 ` Zbigniew Kempczyński
2022-03-31 16:34 ` [igt-dev] [PATCH i-g-t 2/3] tests/i915/gem_concurrent_all: Add no-reloc capability Kamil Konieczny
2022-04-01 6:13 ` Zbigniew Kempczyński
2022-03-31 16:34 ` [igt-dev] [PATCH i-g-t 3/3] i915/gem_concurrent_all: fix swap subtest group Kamil Konieczny
2022-04-01 6:14 ` Zbigniew Kempczyński [this message]
2022-03-31 18:32 ` [igt-dev] ✓ Fi.CI.BAT: success for i915/gem_concurrent_all: Add no-reloc (rev7) Patchwork
2022-03-31 22:56 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
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=YkaYS6qmjalb3zxp@zkempczy-mobl2 \
--to=zbigniew.kempczynski@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.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