On Tue, Nov 24, 2015 at 11:17:38PM +0000, Chris Wilson wrote: > 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. Well swapping to frontswap should be ok. Trashing not so much, and if we do that I suspect there's something really loopsided with memory usage balancing going on ... Does the android workload have your "only shrink inactive" patch already? -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx