On Mon, 15 Mar 2010 00:26:42 +0100 Andrea Righi <arighi@xxxxxxxxxxx> wrote: > Apply the cgroup dirty pages accounting and limiting infrastructure to > the opportune kernel functions. > > [ NOTE: for now do not account WritebackTmp pages (FUSE) and NILFS2 > bounce pages. This depends on charging also bounce pages per cgroup. ] > > As a bonus, make determine_dirtyable_memory() static again: this > function isn't used anymore outside page writeback. > > Signed-off-by: Andrea Righi <arighi@xxxxxxxxxxx> Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> A nitpick. > @@ -660,6 +705,8 @@ void throttle_vm_writeout(gfp_t gfp_mask) > unsigned long dirty_thresh; > > for ( ; ; ) { > + unsigned long dirty; > + > get_dirty_limits(&background_thresh, &dirty_thresh, NULL, NULL); > > /* > @@ -668,10 +715,10 @@ void throttle_vm_writeout(gfp_t gfp_mask) > */ > dirty_thresh += dirty_thresh / 10; /* wheeee... */ > > - if (global_page_state(NR_UNSTABLE_NFS) + > - global_page_state(NR_WRITEBACK) <= dirty_thresh) > - break; > - congestion_wait(BLK_RW_ASYNC, HZ/10); > + dirty = get_dirty_writeback_pages(); > + if (dirty <= dirty_thresh) > + break; > + congestion_wait(BLK_RW_ASYNC, HZ/10); > > /* > * The caller might hold locks which can prevent IO completion "dirty" seems not to be necessary. if (get_dirty_writeback_pages() < dirty_thresh) ? Thanks, -Kame -- 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/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>