From: Caz Yokoyama <Caz.Yokoyama@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] FW: [PATCH i-g-t] lib: Incrementally mlock()
Date: Tue, 26 Feb 2019 12:34:01 -0800 [thread overview]
Message-ID: <a9a3f89b170b347a9a950cad05d084b9b080683c.camel@intel.com> (raw)
In-Reply-To: <155120293240.17933.1163929338399135708@skylake-alporthouse-com>
On Tue, 2019-02-26 at 17:42 +0000, Chris Wilson wrote:
> Quoting Yokoyama, Caz (2019-02-26 17:42:51)
> > Chris,
> > I am OK to give "Reviewed by: XXXX" to your patch.
> > However, I want to add following comment/modification which does
> > not
> > affect the effect of your patch.
> >
> > + /*
> > + * This is a bug which mlocks far
> > beyond memory,
> > + * i.e. there is a hole between 3/4
> > of
> > avail and
> > + * (bytes * sizeof(*can_mlock))
> > where
> > + * sizeof(*can_mlock)=8. Because of
> > the
> > hole, mlock()
> > + * may fail and get out of while
> > loop.
> > + * However, We need the hole.
> > Otherwise
> > OOM kills parent
> > + * process. Another mlock() below
> > is
> > same.
> > + */
> > + if (mlock((void *)can_mlock +
> > (bytes *
> > sizeof(*can_mlock)),
>
> But that's a bug in our code, not mlock(). If we try to mlock more
> memory than is available on the system, quite understandably mlock
> fails.
>
> So what you are saying here is that you purposely want to not find
> the
> limits of mlockable memory.
>
> The bug as far as I am concerned was that a subsequent mlock could
> not
> claim the same amount of memory as a previous one -- that feels like
> the
> mm is not reclaiming everything it can after killing the child, or at
> least not making that available again immediately.
> -Chris
Even there was this bug in original code. We have to fix the bug.
However, Fixing the bug makes the test die. I proposed a solution. But
it destroys the purpose of the test. I have no idea how to achieve both
fixing the bug and test porpose.
-caz
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-02-26 20:27 UTC|newest]
Thread overview: 18+ 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
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 [this message]
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
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=a9a3f89b170b347a9a950cad05d084b9b080683c.camel@intel.com \
--to=caz.yokoyama@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