On Tue, Jan 10, 2017 at 01:55:52PM +0100, Michal Hocko wrote: > From: Michal Hocko <mhocko@xxxxxxxx> > > inactive_list_is_low is duplicating logic implemented by > lruvec_lru_size_eligibe_zones. Let's use the dedicated function to get > the number of eligible pages on the lru list and ask use lruvec_lru_size > to get the total LRU lize only when the tracing is really requested. We > are still iterating over all LRUs two times in that case but a) > inactive_list_is_low is not a hot path and b) this can be addressed at > the tracing layer and only evaluate arguments only when the tracing is > enabled in future if that ever matters. lruvec_zone_lru_size() is no longer needed after this. Again, it would be better to consolidate everything into one lruvec_lru_size() that takes a reclaim index. Trivial to rebase on top of that, though, so: > Signed-off-by: Michal Hocko <mhocko@xxxxxxxx> Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx> Thanks -- 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>