[PATCH] improve speed of freeing bootmem

From: Josh Aas <josha_at_sgi.com>
Date: 2004-08-07 05:26:27
Attached is a patch that greatly improves the speed of freeing boot 
memory. On ia64 machines with 2GB or more memory (I didn't test with 
less, but I can't imagine there being a problem), the speed improvement 
is about 75% for the function free_all_bootmem_core. This translates to 
savings on the order of 1 minute / TB of memory during boot time. That 
number comes from testing on a machine with 512GB, and extrapolating 
based on profiling of an unpatched 4TB machine. For 4 and 8 TB machines, 
the time spent in this function is about 1 minutes/TB, which is painful 
especially given that there is no indication of what is going on put to 
the console (this issue to possibly be addressed later).

The basic idea is to free higher order pages instead of going through 
every single one. Also, some unnecessary atomic operations are done away 
with and replaced with non-atomic equivalents, and prefetching is done 
where it helps the most. For a more in-depth discusion of this patch, 
please see the linux-ia64 archives (topic is "free bootmem feedback patch").

The patch is originally Tony Luck's, and I added some further 
optimizations (non-atomic ops improvements and prefetching).

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Josh Aas <josha@sgi.com>

Josh Aas
Silicon Graphics, Inc. (SGI)
Linux System Software

To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Received on Fri Aug 6 15:30:18 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:29 EST