public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>,
	Chris Wilson <chris@chris-wilson.co.uk>,
	tim.gore@intel.com, daniel.vetter@ffwll.ch,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] intel-gpu-tools: skip gem_mmap_offset_exhaustion on Android
Date: Fri, 25 Jul 2014 10:56:04 +0100	[thread overview]
Message-ID: <53D229B4.1080309@linux.intel.com> (raw)
In-Reply-To: <20140725093718.GT4747@phenom.ffwll.local>


On 07/25/2014 10:37 AM, Daniel Vetter wrote:
> On Fri, Jul 25, 2014 at 10:17:26AM +0100, Chris Wilson wrote:
>> On Fri, Jul 25, 2014 at 11:06:38AM +0200, Daniel Vetter wrote:
>>> On Fri, Jul 25, 2014 at 10:00:19AM +0100, tim.gore@intel.com wrote:
>>>> From: Tim Gore <tim.gore@intel.com>
>>>>
>>>> gem_mmap_offset_exhaustion relies on purgeable memory
>>>> allocations getting swapped out, freeing up physical
>>>> memory for further allocations. On Android we have no
>>>> swap partition so this cannot happen and the test gets
>>>> killed by the low memory killer before mmap offset
>>>> exhaustion can happen, thus defeating the tests purpose.
>>>>
>>>> Signed-off-by: Tim Gore <tim.gore@intel.com>
>>>
>>>
>>>
>>> 	/* we happily leak objects to exhaust mmap offset space, the kernel will
>>> 	 * reap backing storage. */
>>> 	gem_madvise(fd, handle, I915_MADV_DONTNEED);
>>>
>>> There's really no way you should be able to run out of memory. I suspect
>>> android kernel's will fall over even with swap.
>>
>> No, it's just the android lowmemkiller hates i915 by design. The two are
>> more or less incompatible.
>
> Well someone should fix up the lowmemkiller then. Disabling the test is
> not really fixing it.

AFAIR lowmemorykiller is a weird thing which tries to prevent pagecache 
dropping below a configurable threshold by killing processes. If free 
pages are below a threshold _and_ page cache is below the same threshold 
it will try to kill something. I suppose this is to prevent kernel in 
purging the page cache on its own. Interactions must be quite complex 
here given that thresholds (in num pages) and oom scores triggers per 
each threshold are multiple and configurable.

I was just disabling it when running IGT (echo 0 
 >/sys/module/lowmemorykiller/parameters/minfree). It is probably 
debatable whether this is OK or not, depending how you look at IGT in 
the overall pool of testing.

Tvrtko

      reply	other threads:[~2014-07-25  9:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-25  9:00 [PATCH] intel-gpu-tools: skip gem_mmap_offset_exhaustion on Android tim.gore
2014-07-25  9:06 ` Daniel Vetter
2014-07-25  9:14   ` Gore, Tim
2014-07-25  9:39     ` Daniel Vetter
2014-07-25  9:17   ` Chris Wilson
2014-07-25  9:37     ` Daniel Vetter
2014-07-25  9:56       ` Tvrtko Ursulin [this message]

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=53D229B4.1080309@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=tim.gore@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