From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:44230 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751849AbdHRQQ6 (ORCPT ); Fri, 18 Aug 2017 12:16:58 -0400 Date: Fri, 18 Aug 2017 09:17:00 -0700 From: Greg Kroah-Hartman To: Mathias Nyman Cc: stable@vger.kernel.org Subject: Re: [PATCH] usb: optimize acpi companion search for usb port devices Message-ID: <20170818161700.GB9858@kroah.com> References: <1503054177-2490-1-git-send-email-mathias.nyman@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1503054177-2490-1-git-send-email-mathias.nyman@linux.intel.com> Sender: stable-owner@vger.kernel.org List-ID: On Fri, Aug 18, 2017 at 02:02:57PM +0300, Mathias Nyman wrote: > commit ed18c5fa945768a9bec994e786edbbbc7695acf6 upstream > > This optimization significantly reduces xhci driver load time. > > In ACPI tables the acpi companion port devices are children of > the hub device. The port devices are identified by their port number > returned by the ACPI _ADR method. > _ADR 0 is reserved for the root hub device. > > The current implementation to find a acpi companion port device > loops through all acpi port devices under that parent hub, evaluating > their _ADR method each time a new port device is added. > > for a xHC controller with 25 ports under its roothub it > will end up invoking ACPI bytecode 625 times before all ports > are ready, making it really slow. > > The _ADR values are already read and cached earler. So instead of > running the bytecode again we can check the cached _ADR value first, > and then fall back to the old way. > > As one of the more significant changes, the xhci load time on > Intel kabylake reduced by 70%, (28ms) from > initcall xhci_pci_init+0x0/0x49 returned 0 after 39537 usecs > to > initcall xhci_pci_init+0x0/0x49 returned 0 after 11270 usecs > > Signed-off-by: Mathias Nyman > Signed-off-by: Greg Kroah-Hartman > --- > drivers/usb/core/usb-acpi.c | 26 +++++++++++++++++++++++--- > 1 file changed, 23 insertions(+), 3 deletions(-) What stable kernel tree(s) is this for? thanks, greg k-h