Thread (18 messages) 18 messages, 5 authors, 2019-06-04

Re: [PATCH kernel] prom_init: Fetch flatten device tree from the system firmware

From: Segher Boessenkool <hidden>
Date: 2019-05-03 15:34:11

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help