Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758387AbcJ1J4Z (ORCPT ); Fri, 28 Oct 2016 05:56:25 -0400 Received: from mailout2.hostsharing.net ([83.223.90.233]:39917 "EHLO mailout2.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753167AbcJ1J4X (ORCPT ); Fri, 28 Oct 2016 05:56:23 -0400 Date: Fri, 28 Oct 2016 11:57:05 +0200 From: Lukas Wunner To: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" , Linux PM list , Alan Stern , Linux Kernel Mailing List , Tomeu Vizoso , Mark Brown , Marek Szyprowski , Kevin Hilman , Ulf Hansson , "Luis R. Rodriguez" Subject: Re: [PATCH v5 2/5] driver core: Functional dependencies tracking support Message-ID: <20161028095705.GA7959@wunner.de> References: <27296716.H9VWo8ShOm@vostro.rjw.lan> <13957403.ZrB4mMbICz@vostro.rjw.lan> <2715729.9U1nlcpFb3@vostro.rjw.lan> <20161026111902.GA6447@wunner.de> <20161027152551.GA15718@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161027152551.GA15718@kroah.com> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1583 Lines: 33 On Thu, Oct 27, 2016 at 05:25:51PM +0200, Greg Kroah-Hartman wrote: > On Wed, Oct 26, 2016 at 01:19:02PM +0200, Lukas Wunner wrote: > > On Mon, Oct 10, 2016 at 02:51:04PM +0200, Rafael J. Wysocki wrote: > > > - Modify device_links_check_suppliers(), device_links_driver_bound(), > > > device_links_no_driver(), device_links_driver_cleanup(), device_links_busy(), > > > and device_links_unbind_consumers() to walk link lists under device_links_lock > > > (to make the new "driver presence tracking" mechanism work reliably). > > > > This change might increase boot time if drivers return -EPROBE_DEFER. > > "might"? Please verify this before guessing.... I can't, my machine only uses device links for Thunderbolt hotplug ports, and their driver (portdrv) doesn't use deferred probing. I'm only aware of a single device in my system whose driver causes others to defer probing (apple-gmux), but they don't use device links, so the mutex is only acquired very briefly because the supplier/consumer lists are empty, hence the performance impact can't be measured on my system. But the situation may be different for Marek's or Hanjun's use cases. I'm not familiar with their systems, hence the "might". > And don't make this more complex than needed before actually determining > a real issue. As pointed out it currently *is* more complex than needed because the device_link_state is dispensable. The whole issue is moot with the changes I suggested because the mutex would only have to be taken for addition/deletion of device links, not when probing. Thanks, Lukas