Re: [PATCH 0/2] Disable Android low memory killer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 26, 2014 at 10:46:48AM +0000, Gore, Tim wrote:
> 
> 
> > -----Original Message-----
> > From: Chris Wilson [mailto:chris@xxxxxxxxxxxxxxxxxx]
> > Sent: Friday, September 26, 2014 11:30 AM
> > To: Gore, Tim
> > Cc: intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> > Subject: Re:  [PATCH 0/2] Disable Android low memory killer
> > 
> > On Fri, Sep 26, 2014 at 10:08:54AM +0000, Gore, Tim wrote:
> > > I don't think so. This is really just about the Android low memory
> > > killer having Different goals to kswapd. Kswapd tries to keep a
> > > certain amount of free memory so that the kernel can run smoothly. On
> > > Android the lowmemorykiller attempts to maintain somewhat higher
> > > levels of free memory by killing off processes, because the user is
> > > not expected to ever close anything and expects new applications to
> > > open quickly. So if you put the memory under pressure the Android low
> > > memory killer will inevitably look for something to kill, and if your
> > > test is the only thing running its toast. The linux oom killer is still there, but
> > is never needed on Android because the lowmemorykiller gets there first.
> > 
> > Though I think the interaction between lowmemkiller and i915 is broken, I do
> > agree that we need to run our swap tests and that to do so we need to
> > disable lowmemkiller.
> > 
> > I would prefer it if only the swap-thrash tests disabled the lowmemkiller
> > though, as I think we still need to test integration behaviour and if
> > lowmemkiller starts killing tests that we think should be well within the limits,
> > that is likely to be our bug.
> > -Chris
> > 
> We could do it on a test by test basis if people prefer. It just puts the responsibility
> on test writers to know when they might trigger the lowmemorykiller. The trouble
> is that the kernel is pretty lazy when comes to freeing up memory. You may think
> there should be plenty "free", but that doesn't mean those pages are on the free list.
> Once kswapd has achieved its high water mark its done. But the lowmemorykiller
> always looks for more than the high water mark (its threshold is based on the
> high water mark, so is always higher). If you have enough file backed pages you're ok,
> but igt tests don't tend to do much file reading.

The principle is that mempressure tests call intel_check_memory() first
to see if it valid to run. One of its side-effects is kick the kernel
into freeing up all of its caches. It seems reasonable that we could
disable lowmemkiller here if the test declares that it wants to use
swap. The trick I leave up to you is how to reenable lowmemkiller
automatically when the test completes...

Or since swap tests are already special, there is no problem in having
  igt_swapping_start();
  ...
  igt_swapping_end();
bracketing them.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux