diff options
| author | Andrew Morton <akpm@digeo.com> | 2003-04-12 12:57:13 -0700 |
|---|---|---|
| committer | James Bottomley <jejb@raven.il.steeleye.com> | 2003-04-12 12:57:13 -0700 |
| commit | 79e626e1d10916241f200066e9216380afca86bb (patch) | |
| tree | 113b2e71edcb61e3a5e96169dc6b7d60c9bac8e2 /include/linux | |
| parent | a413a276a079b9a8f125f921e055b908b95f8251 (diff) | |
[PATCH] bootmem speedup from the IA64 tree
From: Christoph Hellwig <hch@lst.de>
This patch is from the IA64 tree, with some minor cleanups by me.
David described it as:
This is a performance speed up and some minor indendation fixups.
The problem is that the bootmem code is (a) hugely slow and (b) has
execution that grow quadratically with the size of the bootmap bitmap.
This causes noticable slowdowns, especially on machines with (relatively)
large holes in the physical memory map. Issue (b) is addressed by
maintaining the "last_success" cache, so that we start the next search
from the place where we last found some memory (this part of the patch
could stand additional reviewing/testing). Issue (a) is addressed by
using find_next_zero_bit() instead of the slow bit-by-bit testing.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/bootmem.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index 782041f43326..6902724691d2 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h @@ -32,6 +32,8 @@ typedef struct bootmem_data { void *node_bootmem_map; unsigned long last_offset; unsigned long last_pos; + unsigned long last_success; /* Previous allocation point. To speed + * up searching */ } bootmem_data_t; extern unsigned long __init bootmem_bootmap_pages (unsigned long); |
