Re: + mm-vmscan-reclaim-order-0-and-use-compaction-instead-of-lumpy-reclaim-avoid-a-potential-deadlock-due-to-lock_page-during-direct-compaction-fix.patchadded to -mm tree

From: David Rientjes
Date: Tue Jan 11 2011 - 16:43:17 EST


On Tue, 11 Jan 2011, akpm@xxxxxxxxxxxxxxxxxxxx wrote:

> diff -puN mm/page_alloc.c~mm-vmscan-reclaim-order-0-and-use-compaction-instead-of-lumpy-reclaim-avoid-a-potential-deadlock-due-to-lock_page-during-direct-compaction-fix mm/page_alloc.c
> --- a/mm/page_alloc.c~mm-vmscan-reclaim-order-0-and-use-compaction-instead-of-lumpy-reclaim-avoid-a-potential-deadlock-due-to-lock_page-during-direct-compaction-fix
> +++ a/mm/page_alloc.c
> @@ -1815,15 +1815,15 @@ __alloc_pages_direct_compact(gfp_t gfp_m
> int migratetype, unsigned long *did_some_progress)
> {
> struct page *page;
> - struct task_struct *p = current;
> + struct task_struct *tsk = current;
>
> if (!order || compaction_deferred(preferred_zone))
> return NULL;
>
> - p->flags |= PF_MEMALLOC;
> + tsk->flags |= PF_MEMALLOC;
> *did_some_progress = try_to_compact_pages(zonelist, order, gfp_mask,
> nodemask);
> - p->flags &= ~PF_MEMALLOC;
> + tsk->flags &= ~PF_MEMALLOC;
> if (*did_some_progress != COMPACT_SKIPPED) {
>
> /* Page migration frees to the PCP lists but we want merging */

This could be done for all of the page allocator functions in
mm/page_alloc.c, I think it would be inconsistent and slightly harder to
read if it were done in only one.
--
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/