On Thu, 2005-02-24 at 09:29, Dave Hansen wrote: > Using the assumption that all addresses in the SRAT are ascending, > the calculations can get a bit simpler, and remove the > "been_here_before" variable. > > This also breaks that calculation out into its own function, which > further simplifies the look of the code. > > Signed-off-by: Dave Hansen > --- > > sparse-dave/arch/i386/kernel/srat.c | 61 ++++++++++++++++++------------------ > 1 files changed, 32 insertions(+), 29 deletions(-) (snip) This looks a lot better then the existing code. Thanks. Why not take it one step further?? Something like the attached patch. There is no reason to loop over the nodes as the srat entries contain node info and we can use the the new node_has_online_mem. This booted ok on my hot-add enabled 8-way. I am not %100 sure it is ok to make the assumption that the memory is always reported linearly but that is the assumption of the previous code so it must be for all know examples. Keith