> In addition I want to make an additional pass in the resource
> allocation so I can do optimal packing of the pci memory space. When
> everything is restricted to being power of 2 aligned and power of 2
> sized the optimal algorithm is just allocating the smallest areas
> right above 4G, and then working our way up to 3G or however much
> pci memory space we need.
>
> Eric
You may want to approach that from the other direction and allocate from the
end of 4G space with the largest alloc first and work down in size: because
of the alignment restriction of 2^n being on a 2^n(th) boundary if the sizes
are sorted with the largest at the end holes in the map should be minimized
since no padding will be needed between PCI address spaces (at least until a
hotplug something is added/pulled).
Also biggest last allows for the maximum amount of RAM to be under 4G,
depending on RAM mapping granularity.
The part I was worrying about "was smallest right above 4G"? most PCI is
32bit and so could not be allocated above 4G