On Thu, May 02, 2019 at 03:16:48PM +1000, Nicholas Piggin wrote: > David Gibson's on May 2, 2019 2:22 pm: > > On Tue, Apr 30, 2019 at 06:15:35PM +1000, Nicholas Piggin wrote: > >> Searching for duplicate names scales O(n^2) with the number of names > >> added to a fdt, which can cause a noticable slowdown with larger device > >> trees and very slow CPU cores. > >> > >> Add FDT_CREATE_FLAG_FAST that allow the caller to trade fdt size for > >> speed in the creation process. > > > > "FAST" is terribly non-specific, I'd prefer to be explict about what > > this does. Maybe "SKIP_NAME_DEDUP"? > > It was kind of intended to be non-specific. I don't know that the > caller should ever really have know that it's specifically for name > de-duplication or have to think too hard about it. > > Example: you could add more extensive integrity checks and > exclude them with this flag too. I can see why you'd want to avoid such low-level specifics in the interface. But the trouble is that "fast" doesn't even give us a good idea of what exactly the trade-off is here - and you only want this interface if you care about that. If we found a way in future to speed things up even more but with a much greater cost in space this might no longer be a suitable tradeoff for the people using the flag. libfdt is already pretty low-level, so I think having really specific flags is the lesser evil. > Example: you might use some other data structure that speeds up > deduplication enough you could restore it even with this flag. I guess, though this is pretty much impossibly difficult because the library has nowhere to keep the state it would need. > Your call though, I can rename it. Please do. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Attachment:
signature.asc
Description: PGP signature