Re: [PATCH] drm/i915: Disable shrinker for non-swapped backed objects

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

 



On Tue, Nov 24, 2015 at 06:15:47PM +0100, Daniel Vetter wrote:
> On Mon, Nov 23, 2015 at 09:20:24AM +0000, Chris Wilson wrote:
> > If the system has no available swap pages, we cannot make forward
> > progress in the shrinker by releasing active pages, only by releasing
> > purgeable pages which are immediately reaped. Take total_swap_pages into
> > account when counting up available objects to be shrunk and subsequently
> > shrinking them. By doing so, we avoid unbinding objects that cannot be
> > shrunk and so wasting CPU cycles flushing those objects from the GPU to
> > the system and then immediately back again (as they will more than
> > likely be reused shortly after).
> > 
> > Based on a patch by Akash Goel.
> > 
> > Reported-by: Akash Goel <akash.goel@xxxxxxxxx>
> > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > Cc: Akash Goel <akash.goel@xxxxxxxxx>
> > Cc: sourab.gupta@xxxxxxxxx
> 
> Cc: linux-mm@xxxxxxxxx should be done on this one, just in case they have
> ideas for proper interfaces for this. Which might be, given that Jerome
> Glisse is working on swaput-to-vram and other fun stuff like that.
> 
> Also, how does stuff like zswap (or whatever "compress my swap in memory"
> is called again) factor in here? Iirc Android very much does use that.

It doesn't. We would need

#include <linux/frontswap.h>

static bool swap_available(void)
{
	return total_swap_pages || frontswap_enabled;
}

But if that then returns true for Android it seems the primary usecase
is invalidated.
-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