Re: [PATCH 2/2] wait for page writeback when directly reclaimingcontiguous areas
From: Andrew Morton
Date: Mon Aug 06 2007 - 15:23:16 EST
On Thu, 02 Aug 2007 19:18:43 +0100 Andy Whitcroft <apw@xxxxxxxxxxxx> wrote:
> @@ -458,8 +475,15 @@ static unsigned long shrink_page_list(struct list_head *page_list,
> if (page_mapped(page) || PageSwapCache(page))
> sc->nr_scanned++;
>
> - if (PageWriteback(page))
> - goto keep_locked;
> + may_enter_fs = (sc->gfp_mask & __GFP_FS) ||
> + (PageSwapCache(page) && (sc->gfp_mask & __GFP_IO));
> +
> + if (PageWriteback(page)) {
> + if (sync_writeback == PAGEOUT_IO_SYNC && may_enter_fs)
> + wait_on_page_writeback(page);
> + else
> + goto keep_locked;
> + }
this bit could do with a comment explaining the design decisions, please.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/