lkml.org 
[lkml]   [2010]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch 1/1] x86 pci: Add option to not assign BAR's if not already assigned
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


\
 
 \ /
  Last update: 2010-05-13 21:11    [W:0.695 / U:2.848 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site