[PATCH v8 55/61] resources: Make allocate_resource() return best fit resource

2015-10-27 Thread Yinghai Lu
Current code just allocate from first avail window. We can find all suitable empty slots and pick one with smallest size, so we could save the big slot for needed ones later when we have several pci bridges under parent bridge and some bridges get assigned from bios and we need to assign others

[PATCH v8 55/61] resources: Make allocate_resource() return best fit resource

2015-10-27 Thread Yinghai Lu
Current code just allocate from first avail window. We can find all suitable empty slots and pick one with smallest size, so we could save the big slot for needed ones later when we have several pci bridges under parent bridge and some bridges get assigned from bios and we need to assign others