On Thursday 27 September 2007 11:50, Fengguang Wu wrote:
> We don't want to introduce pointless delays in throttle_vm_writeout()
> when the writeback limits are not yet exceeded, do we?

I don't think so (ie. I agree with you).
IIRC, Marcelo initially did the throttle_vm_writeout?

> Cc: Nick Piggin <[EMAIL PROTECTED]>
> Cc: OGAWA Hirofumi <[EMAIL PROTECTED]>
> Cc: Kumar Gala <[EMAIL PROTECTED]>
> Cc: Pete Zaitcev <[EMAIL PROTECTED]>
> Cc: Greg KH <[EMAIL PROTECTED]>
> Signed-off-by: Fengguang Wu <[EMAIL PROTECTED]>
> ---
>  mm/page-writeback.c |   18 ++++++++----------
>  1 file changed, 8 insertions(+), 10 deletions(-)
>
> --- linux-2.6.23-rc8-mm1.orig/mm/page-writeback.c
> +++ linux-2.6.23-rc8-mm1/mm/page-writeback.c
> @@ -507,16 +507,6 @@ void throttle_vm_writeout(gfp_t gfp_mask
>       long background_thresh;
>       long dirty_thresh;
>
> -     if ((gfp_mask & (__GFP_FS|__GFP_IO)) != (__GFP_FS|__GFP_IO)) {
> -             /*
> -              * The caller might hold locks which can prevent IO completion
> -              * or progress in the filesystem.  So we cannot just sit here
> -              * waiting for IO to complete.
> -              */
> -             congestion_wait(WRITE, HZ/10);
> -             return;
> -     }
> -
>          for ( ; ; ) {
>               get_dirty_limits(&background_thresh, &dirty_thresh, NULL, NULL);
>
> @@ -530,6 +520,14 @@ void throttle_vm_writeout(gfp_t gfp_mask
>                       global_page_state(NR_WRITEBACK) <= dirty_thresh)
>                               break;
>                  congestion_wait(WRITE, HZ/10);
> +
> +             /*
> +              * The caller might hold locks which can prevent IO completion
> +              * or progress in the filesystem.  So we cannot just sit here
> +              * waiting for IO to complete.
> +              */
> +             if ((gfp_mask & (__GFP_FS|__GFP_IO)) != (__GFP_FS|__GFP_IO))
> +                     break;
>          }
>  }
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to