Re: [PATCH][2.6-mm] split drain_local_pages

From: Pavel Machek
Date: Mon Feb 16 2004 - 17:50:19 EST


Hi!


> CPU hotplug core needs to pass a cpu parameter to drain_local_pages, it's
> safe to call __drain_local_pages if the cpu being drained is offline. The
> semantics for drain_local_pages do not change.

The idea looks good to me, but there's something wrong with the patch:

> Index: linux-2.6.3-rc3-mm1/mm/page_alloc.c
> ===================================================================
> RCS file: /home/cvsroot/linux-2.6.3-rc3-mm1/mm/page_alloc.c,v
> retrieving revision 1.1.1.1
> diff -u -p -B -r1.1.1.1 page_alloc.c
> --- linux-2.6.3-rc3-mm1/mm/page_alloc.c 16 Feb 2004 20:42:50 -0000 1.1.1.1
> +++ linux-2.6.3-rc3-mm1/mm/page_alloc.c 16 Feb 2004 21:58:19 -0000
> @@ -414,19 +414,19 @@ int is_head_of_free_region(struct page *
> }
>
> /*
> - * Spill all of this CPU's per-cpu pages back into the buddy allocator.
> + * drain_local_pages helper, this is only safe to use when the cpu
> + * being drained isn't currently online.
> */
> -void drain_local_pages(void)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It was void before...

> @@ -1574,7 +1586,7 @@ static int page_alloc_cpu_notify(struct
> count = &per_cpu(nr_pagecache_local, cpu);
> atomic_add(*count, &nr_pagecache);
> *count = 0;
> - drain_local_pages(cpu);

...but code was passing cpu? The old version could not have compiled
according to the patch..
Pavel
--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
-
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/