On Mon, 15 Mar 2010 00:26:42 +0100
Andrea Righi <[email protected]> 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 <[email protected]>

Reviewed-by: KAMEZAWA Hiroyuki <[email protected]>

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



_______________________________________________
Containers mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/containers

_______________________________________________
Devel mailing list
[email protected]
https://openvz.org/mailman/listinfo/devel

Reply via email to