public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Ashutosh Dixit <ashutosh.dixit@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
	Caz Yokoyama <caz@caz-nuc.ra.intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t] lib: Incrementally mlock()
Date: Tue, 19 Feb 2019 21:39:55 -0800	[thread overview]
Message-ID: <87lg2bauhg.fsf@intel.com> (raw)
In-Reply-To: <20190219222110.19815-1-chris@chris-wilson.co.uk> (Chris Wilson's message of "Tue, 19 Feb 2019 15:21:10 -0700")

On Tue, Feb 19 2019 at 09:26:56 PM, Ashutosh Dixit <ashutosh.dixit@intel.com> wrote:
> On Tue, Feb 19 2019 at 03:21:10 PM, Chris Wilson <chris@chris-wilson.co.uk> wrote:
>> As we already have the previous portion of the mmap mlocked, we only
>> need to mlock() the fresh portion for testing available memory.
>
> Still looking at what is wrong with the patch but with the patch the
> test is unable to lock as much memory as before and invoke the
> shrinker. Here are the outputs before and after the patch on a system
> with 16 GB:

OK, found the bug. The bug is that can_mlock is u64*. Therefore
can_mlock must be cast to u8* on these two lines:


> +     if (mlock(can_mlock + bytes, inc))

and 

> +	igt_assert(!mlock(can_mlock + locked, *can_mlock - locked));

However when we do this, the parent process invariably gets killed by
the OOM killer, something which was not happening previously:

# ./i915_suspend --run-subtest shrink
IGT-Version: 1.23-g9ef791ce (x86_64) (Linux: 5.0.0-rc5+ x86_64)
Starting subtest: shrink
child 0 died with signal 9, Killed
child 0 died with signal 9, Killed
child 0 died with signal 9, Killed
child 0 died with signal 9, Killed
child 0 died with signal 9, Killed
child 0 died with signal 9, Killed
Killed
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  parent reply	other threads:[~2019-02-20  5:39 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-20  1:13 [igt-dev] [igt PATCH 0/1] lib: igt@i915_suspend@shrink faster Caz Yokoyama
2019-02-19 19:05 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-02-19 22:37 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-02-19 22:49 ` [igt-dev] ✓ Fi.CI.BAT: success for lib: igt@i915_suspend@shrink faster (rev2) Patchwork
2019-02-20  0:53 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-02-20  1:13 ` [igt-dev] [igt PATCH 1/1] igt@i915_suspend@shrink faster Caz Yokoyama
2019-02-19 22:21   ` [igt-dev] [PATCH i-g-t] lib: Incrementally mlock() Chris Wilson
2019-02-20  5:26     ` Ashutosh Dixit
2019-02-20  5:39     ` Ashutosh Dixit [this message]
2019-02-20 22:28       ` Caz Yokoyama
2019-02-26 17:42     ` [igt-dev] FW: " Yokoyama, Caz
2019-02-26 17:42       ` Chris Wilson
2019-02-26 20:34         ` Caz Yokoyama
2019-02-26 21:31           ` Chris Wilson
2019-02-27  0:40             ` Caz Yokoyama
2019-02-27  8:13               ` Chris Wilson
2019-02-20  3:14   ` [igt-dev] [igt PATCH 1/1] igt@i915_suspend@shrink faster Ashutosh Dixit
2019-02-26 17:56 ` [igt-dev] ✗ Fi.CI.BAT: failure for lib: igt@i915_suspend@shrink faster (rev3) Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2019-02-27 16:29 [igt-dev] [PATCH i-g-t] lib: Incrementally mlock() Chris Wilson
2019-02-27 17:34 ` Caz Yokoyama
2019-02-27 21:15   ` Chris Wilson
2019-02-28 18:56 ` Caz Yokoyama

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=87lg2bauhg.fsf@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=caz@caz-nuc.ra.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=igt-dev@lists.freedesktop.org \
    /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