Re: [Patch 1/1] x86 pci: Add option to not assign BAR's if not already assigned

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/13/2010 11:56 AM, Bjorn Helgaas wrote:
> 
> I'm a little bit nervous about Linux's current strategy of assigning
> resources to things before we even know whether we're going to use
> them.  We don't support dynamic PCI resource reassignment, so maybe
> we don't have any choice in this case, but generally I prefer the
> lazy approach.
> 

Lazy has its own pitfalls.  In particular, the issue here is about
allocation of bridge devices, which may cause all kinds of issues with
bridges further up.  Consider:


	       A
	      / \
             B   C
             |   |
             D   E

... where A, B, and C are bridges, and D and E are devices.  Now the
driver initializes D, and requests address space.  As a result, the OS
configures bridge B to have a 4K window, and accordingly the same for
bridge A.

Now you want to initialize device E.  This means the window for bridge A
has to be widened, because bridge C is going to need its own 4K window.
 If the linearly consecutive address space is not available, it now
means reconfiguring bridge B and device D.

4K granularity really hurts.  It made sense when bridges were relatively
rare, but in PCI-express world that is no longer the case...

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

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux