From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965077AbcKJWkv (ORCPT ); Thu, 10 Nov 2016 17:40:51 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:41994 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934434AbcKJWks (ORCPT ); Thu, 10 Nov 2016 17:40:48 -0500 Date: Thu, 10 Nov 2016 23:40:54 +0100 From: Greg Kroah-Hartman To: "Luis R. Rodriguez" Cc: Laurent Pinchart , "Rafael J. Wysocki" , Lukas Wunner , "Rafael J. Wysocki" , Linux PM list , Alan Stern , Linux Kernel Mailing List , Tomeu Vizoso , Mark Brown , Marek Szyprowski , Kevin Hilman , Ulf Hansson , Geert Uytterhoeven , Lars-Peter Clausen , Grant Likely , Mauro Carvalho Chehab , Dmitry Torokhov , Andrzej Hajda , Christoph Hellwig , Arnd Bergmann Subject: Re: [PATCH v5 2/5] driver core: Functional dependencies tracking support Message-ID: <20161110224054.GA10575@kroah.com> References: <27296716.H9VWo8ShOm@vostro.rjw.lan> <2305706.WydXUuMppH@avalon> <20161110220407.GQ13978@wotan.suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161110220407.GQ13978@wotan.suse.de> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 10, 2016 at 11:04:07PM +0100, Luis R. Rodriguez wrote: > This is more forward looking, but -- if we had an annotation in Kconfig/turned > to a mod info section, or to start off with just a driver MODULE_SUGGESTS() macro > to start off with it might suffice for the driver core to request_module() > annotated dependencies, such requests could be explicitly suggested as > synchronous so init + probe do run together (as-is today), after which it > could know that all possible drivers that needed to be loaded should now be > loaded. If this sounds plausible to help, do we have drivers where we can > test this on? For instance, since the functional dependency framework > annotates functional dependencies for consumers/providers for suspend/resume > and un time PM could such MODULE_SUGGESTS() annotations be considered on the > consumers to suggest the provider drivers so their own probe yields to their > providers to try first ? No. Stop. First off, the "driver core" NEVER can "know" if "all possible drivers that should be loaded, are loaded. That way lies madness and impossibility. Secondly, yet-another-section isn't going to help anything here, we alredy "suggest" to userspace a bunch of stuff, so we get the needed modules loaded, at sometime in the future, if they are around, and userspace feels like it. That's the best we can ever do. Don't try to make this more difficult than it is please. DEFER works today really really well, and it's really really simple. Inter-dependancy of modules and devices connected to each other are two different things, be careful about this. thanks, greg k-h From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Kroah-Hartman Subject: Re: [PATCH v5 2/5] driver core: Functional dependencies tracking support Date: Thu, 10 Nov 2016 23:40:54 +0100 Message-ID: <20161110224054.GA10575@kroah.com> References: <27296716.H9VWo8ShOm@vostro.rjw.lan> <2305706.WydXUuMppH@avalon> <20161110220407.GQ13978@wotan.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20161110220407.GQ13978@wotan.suse.de> Sender: linux-kernel-owner@vger.kernel.org To: "Luis R. Rodriguez" Cc: Laurent Pinchart , "Rafael J. Wysocki" , Lukas Wunner , "Rafael J. Wysocki" , Linux PM list , Alan Stern , Linux Kernel Mailing List , Tomeu Vizoso , Mark Brown , Marek Szyprowski , Kevin Hilman , Ulf Hansson , Geert Uytterhoeven , Lars-Peter Clausen , Grant Likely , Mauro Carvalho Chehab , Dmitry Torokhov , Andrzej Hajda List-Id: linux-pm@vger.kernel.org On Thu, Nov 10, 2016 at 11:04:07PM +0100, Luis R. Rodriguez wrote: > This is more forward looking, but -- if we had an annotation in Kconfig/turned > to a mod info section, or to start off with just a driver MODULE_SUGGESTS() macro > to start off with it might suffice for the driver core to request_module() > annotated dependencies, such requests could be explicitly suggested as > synchronous so init + probe do run together (as-is today), after which it > could know that all possible drivers that needed to be loaded should now be > loaded. If this sounds plausible to help, do we have drivers where we can > test this on? For instance, since the functional dependency framework > annotates functional dependencies for consumers/providers for suspend/resume > and un time PM could such MODULE_SUGGESTS() annotations be considered on the > consumers to suggest the provider drivers so their own probe yields to their > providers to try first ? No. Stop. First off, the "driver core" NEVER can "know" if "all possible drivers that should be loaded, are loaded. That way lies madness and impossibility. Secondly, yet-another-section isn't going to help anything here, we alredy "suggest" to userspace a bunch of stuff, so we get the needed modules loaded, at sometime in the future, if they are around, and userspace feels like it. That's the best we can ever do. Don't try to make this more difficult than it is please. DEFER works today really really well, and it's really really simple. Inter-dependancy of modules and devices connected to each other are two different things, be careful about this. thanks, greg k-h