On Thu 17-03-11 13:43:50, Johannes Weiner wrote: > > - mem_cgroup_balance_dirty_pages(): if memcg dirty memory usage if above > > background limit, then add memcg to global memcg_over_bg_limit list and use > > memcg's set of memcg_bdi to wakeup each(?) corresponding bdi flusher. If over > > fg limit, then use IO-less style foreground throttling with per-memcg per-bdi > > (aka memcg_bdi) accounting structure. > > I wonder if we could just schedule a for_background work manually in > the memcg case that writes back the corresponding memcg_bdi set (and > e.g. having it continue until either the memcg is below bg thresh OR > the global bg thresh is exceeded OR there is other work scheduled)? > Then we would get away without the extra list, and it doesn't sound > overly complex to implement. But then when you stop background writeback because of other work, you have to know you should restart it after that other work is done. For this you basically need the list. With this approach of one-work-per-memcg you also get into problems that one cgroup can livelock the flusher thread and thus other memcgs won't get writeback. So you have to switch between memcgs once in a while. We've tried several approaches with global background writeback before we arrived at what we have now and what seems to work at least reasonably... Honza -- Jan Kara <jack@xxxxxxx> SUSE Labs, CR -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>