[PATCH kernel] prom_init: Fetch flatten device tree from the system firmware
Segher Boessenkool
segher at kernel.crashing.org
Sat May 4 01:32:17 AEST 2019
On Wed, May 01, 2019 at 01:42:21PM +1000, Alexey Kardashevskiy wrote:
> At the moment, on 256CPU + 256 PCI devices guest, it takes the guest
> about 8.5sec to fetch the entire device tree via the client interface
> as the DT is traversed twice - for strings blob and for struct blob.
> Also, "getprop" is quite slow too as SLOF stores properties in a linked
> list.
Most OF implementations do it that way. An optimisation that can help
a lot is to cache the last accessed node / prop. This of course then
requires you to invalidate that cache at many places you did not think
about :-/
> However, since [1] SLOF builds flattened device tree (FDT) for another
> purpose. [2] adds a new "fdt-fetch" client interface for the OS to fetch
> the FDT.
Since Linux does not do much more with the device tree, this should
work great for it.
Segher
More information about the Linuxppc-dev
mailing list