• Rafael J. Wysocki's avatar
    ACPI: scan: Reduce overhead related to devices with dependencies · 3ba12d8d
    Rafael J. Wysocki authored
    Notice that all of the objects for which the acpi_scan_check_dep()
    return value is greater than 0 are present in acpi_dep_list as consumers
    (there may be multiple entries for one object, but that is not a
    problem), so after carrying out the initial ACPI namespace walk in which
    devices with dependencies are skipped, acpi_bus_scan() can simply walk
    acpi_dep_list and enumerate all of the unique consumer objects from
    there and their descendants instead of walking the entire target branch
    of the ACPI namespace and looking for device objects that have not been
    enumerated yet in it.
    
    Because walking acpi_dep_list is generally less overhead than walking
    the entire ACPI namespace, use the observation above to reduce the
    system initialization overhead related to ACPI, which is particularly
    important on large systems.
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
    3ba12d8d
scan.c 68.6 KB