Skip to content

Commit

Permalink
[PATCH] boot_pageset must not be freed.
Browse files Browse the repository at this point in the history
The boot_pageset needs to be preserved for hotplugging and for off line
processors and nodes. Otherwise pointers will point into memory that has
now a different use. /proc/zoneinfo is currently showing strange results
if processors / nodes are not present.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed Jun 23, 2005
1 parent a493604 commit b7c84c6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions mm/page_alloc.c
Original file line number Diff line number Diff line change
@@ -1742,10 +1742,17 @@ inline void setup_pageset(struct per_cpu_pageset *p, unsigned long batch)
* with interrupts disabled.
*
* Some NUMA counter updates may also be caught by the boot pagesets.
* These will be discarded when bootup is complete.
*
* The boot_pagesets must be kept even after bootup is complete for
* unused processors and/or zones. They do play a role for bootstrapping
* hotplugged processors.
*
* zoneinfo_show() and maybe other functions do
* not check if the processor is online before following the pageset pointer.
* Other parts of the kernel may not check if the zone is available.
*/
static struct per_cpu_pageset
boot_pageset[NR_CPUS] __initdata;
boot_pageset[NR_CPUS];

/*
* Dynamically allocate memory for the

0 comments on commit b7c84c6

Please sign in to comment.