Two approaches for resources survey...

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

 



Hi Bjorn (and others interested) !

So I've gone back on my (still incomplete) series for factoring the
resource management, and decided to try a different approach.

You can see both variants here:

 1) 
https://git.kernel.org/pub/scm/linux/kernel/git/benh/pci.git/log/?h=previous

The previous variant where I pass a policy argument to
pci_host_resource_survey()

 2) https://git.kernel.org/pub/scm/linux/kernel/git/benh/pci.git/log/

The "new" variant where the policy is set in the host bridge instead

Both variants use the PCI flags (PROBE_ONLY etc...) to establish a
default policy.

I tend to prefer variant 2 because in variant 1, I didn't manage to
clarify the interaction between the resource policy and the new
"preserve_config" flag we added for _DSM #5.

It does mean I now have 4 instead of 3 policies to match the various
behaviours but I think it's overall cleaner.

Another advantage of variant 2 is that the policy is now established
earlier (before we scan), which means we'll be able to take it into
account during the scan.

This will be useful if/when we try again to revive Lorenzo old patch to
call pci_read_bridge_bases during probing instead of doing it from the
archs pcibios_bus_fixup(). That consolidation will be needed to bring
x86 and powerpc into the fold.

We'll need to know the policy so we can avoid reading the bridge bases
when doing a full reallocation, thus avoiding tripping on the "don't
shrink" test that Yinghai added to the bus window sizing code, which
breaks platforms that try to reassign everything (Note: we should
understand why that was added btw, I can't make sense of it).

Anyway, have a quick look, it's not well tested yet, may not even build
on most archs, I'd just like to know which of the two approaches is
preferred before I invest much more time one way or another.

Cheers,
Ben.





[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