lkml.org 
[lkml]   [2009]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [this_cpu_xx V4 13/20] this_cpu_ops: page allocator conversion
On Mon, Oct 05, 2009 at 10:55:49AM -0400, Christoph Lameter wrote:
>
> Changes to this patch so far:
>
> Index: linux-2.6/mm/page_alloc.c
> ===================================================================
> --- linux-2.6.orig/mm/page_alloc.c 2009-10-05 09:49:07.000000000 -0500
> +++ linux-2.6/mm/page_alloc.c 2009-10-05 09:48:43.000000000 -0500
> @@ -1098,8 +1098,6 @@ static void free_hot_cold_page(struct pa
> arch_free_page(page, 0);
> kernel_map_pages(page, 1, 0);
>
> - local_irq_save(flags);
> - pcp = &this_cpu_ptr(zone->pageset)->pcp;
> migratetype = get_pageblock_migratetype(page);
> set_page_private(page, migratetype);
> if (unlikely(wasMlocked))

Why did you move local_irq_save() ? It should have stayed where it was
because VM counters are updated under the lock. Only the this_cpu_ptr
should be moving.

> @@ -1121,6 +1119,8 @@ static void free_hot_cold_page(struct pa
> migratetype = MIGRATE_MOVABLE;
> }
>
> + local_irq_save(flags);
> + pcp = &this_cpu_ptr(zone->pageset)->pcp;
> if (cold)
> list_add_tail(&page->lru, &pcp->lists[migratetype]);
> else
> @@ -3120,7 +3120,8 @@ static struct notifier_block __cpuinitda
> /*
> * Allocate per cpu pagesets and initialize them.
> * Before this call only boot pagesets were available.
> - * Boot pagesets will no longer be used after this call is complete.
> + * Boot pagesets will no longer be used by this processorr
> + * after setup_per_cpu_pageset().
> */
> void __init setup_per_cpu_pageset(void)
> {
> @@ -3232,11 +3233,11 @@ __meminit void setup_pagesets(void)
> zone->pageset = &per_cpu_var(boot_pageset);
>
> /*
> - * Special pagesets with zero elements so that frees
> + * Special pagesets with one element so that frees
> * and allocations are not buffered at all.
> */
> for_each_possible_cpu(cpu)
> - setup_pageset(per_cpu_ptr(zone->pageset, cpu), 0);
> + setup_pageset(per_cpu_ptr(zone->pageset, cpu), 1);
>
> }
> }
>

--
Mel Gorman
Part-time Phd Student Linux Technology Center
University of Limerick IBM Dublin Software Lab


\
 
 \ /
  Last update: 2009-10-06 11:55    [W:0.164 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site