On Fri, Feb 25, 2011 at 01:36:00PM -0800, Greg Thelen wrote: [..] > @@ -500,18 +527,27 @@ static void balance_dirty_pages(struct address_space *mapping, > }; > > global_dirty_info(&sys_info); > + if (!memcg_dirty_info(NULL, &memcg_info)) > + memcg_info = sys_info; > > /* > * Throttle it only when the background writeback cannot > * catch-up. This avoids (excessively) small writeouts > * when the bdi limits are ramping up. > */ > - if (dirty_info_reclaimable(&sys_info) + sys_info.nr_writeback <= > + if ((dirty_info_reclaimable(&sys_info) + > + sys_info.nr_writeback <= > (sys_info.background_thresh + > - sys_info.dirty_thresh) / 2) > + sys_info.dirty_thresh) / 2) && > + (dirty_info_reclaimable(&memcg_info) + > + memcg_info.nr_writeback <= > + (memcg_info.background_thresh + > + memcg_info.dirty_thresh) / 2)) > break; > > - bdi_thresh = bdi_dirty_limit(bdi, sys_info.dirty_thresh); > + bdi_thresh = bdi_dirty_limit(bdi, > + min(sys_info.dirty_thresh, > + memcg_info.dirty_thresh)); > bdi_thresh = task_dirty_limit(current, bdi_thresh); Greg, so currently we seem to have per_bdi/per_task dirty limits and now with this patch it will sort of become per_cgroup/per_bdi/per_task dirty limits? I think that kind of makes sense to me. Thanks Vivek -- 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>