On Wed, Nov 25, 2015 at 08:31:02PM +0000, Chris Wilson wrote: > On Wed, Nov 25, 2015 at 02:06:10PM -0500, Johannes Weiner wrote: > > On Wed, Nov 25, 2015 at 06:36:56PM +0000, Chris Wilson wrote: > > > +static bool swap_available(void) > > > +{ > > > + return total_swap_pages || frontswap_enabled; > > > +} > > > > If you use get_nr_swap_pages() instead of total_swap_pages, this will > > also stop scanning objects once the swap space is full. We do that in > > the VM to stop scanning anonymous pages. > > Thanks. Would EXPORT_SYMBOL_GPL(nr_swap_pages) (or equivalent) be > acceptable? No opposition from me. Just please add a small comment that this is for shrinkers with swappable objects. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>