On Tuesday, January 10, 2017 8:56 PM 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. > > Signed-off-by: Michal Hocko <mhocko@xxxxxxxx> > --- Acked-by: Hillf Danton <hillf.zj@xxxxxxxxxxxxxxx> -- 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>