From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: Greg KH <greg@kroah.com>
Cc: "ksummit-discuss@lists.linuxfoundation.org"
<ksummit-discuss@lists.linuxfoundation.org>,
Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
"rafael.j.wysocki" <rafael.j.wysocki@intel.com>,
"vegard.nossum@gmail.com" <vegard.nossum@gmail.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Valentin Rothberg <valentinrothberg@gmail.com>
Subject: Re: [Ksummit-discuss] [TECH TOPIC] Addressing complex dependencies and semantics (v2)
Date: Tue, 9 Aug 2016 14:04:53 +0200 [thread overview]
Message-ID: <CAKMK7uFCjaKKUKn-DTUdsKOqWsAPaaZxVEkUXFZc=m0=82hyvw@mail.gmail.com> (raw)
In-Reply-To: <20160809081734.GA10279@kroah.com>
On Tue, Aug 9, 2016 at 10:17 AM, Greg KH <greg@kroah.com> wrote:
> On Tue, Aug 09, 2016 at 10:08:07AM +0200, Daniel Vetter wrote:
>> On Thu, Aug 4, 2016 at 11:50 AM, Greg KH <greg@kroah.com> wrote:
>> > On Thu, Aug 04, 2016 at 11:22:23AM +0300, Jani Nikula wrote:
>> >> So I admit to being pretty clueless wrt the fine details of module
>> >> loading, but I'm wondering if there could be any way of the module being
>> >> loaded telling the kernel (via a call, not by returning from probe) to
>> >> hold its horses for a while, and keep loading other modules. Sort of
>> >> like deferred probe, but without the full cleanup-retry cycle. The call
>> >> would return to the module later (not unlike deferred probe retries the
>> >> probe), and you could try again whatever it was that made you realize
>> >> you need to defer.
>> >
>> > Nope, it doesn't work that way, sorry.
>>
>> Why? If I just postpone the entire driver load to an async worker and
>> then block if it's not there, that should work?
>
> Maybe, but the code patch from probe() in the driver core, and module
> loader, might be assuming that all is ok, only to have your async init
> later on realize that things are not ok. How you could propagate that
> error back into the driver core might be difficult, if not impossible.
Hm, I hoped we've made progress on that entire idea of async driver
load, and userspace no longer depending upon accurate driver load
error codes from modprobe.
>> > Nice try, just unwind your initialization properly :)
>>
>> There's a slight pratical problem of this being hard to test. Sure in
>> theory it's easy, but given how often we bomb normal module unload
>> already (and that's something our CI tests) practice disagrees.
>
> probe()/disconnect()/probe() in the driver core as an option might be a
> fun way to stress this as others have pointed out here.
I didn't mean "hard to test" as in "I don't know how" - we have a
testcase in CI for this. More as in, among the bazillion bugs I'm
fighting, making driver load perfectly race-free in the face of load
failures (or eventual unloading) isn't a terrible high priority.
Especially since with an on-chip gpu it's pretty hard for normal users
to be able to even hit those paths ;-) If instead we'd be able to just
stall until the thing we need shows up, that would fix the problem
without sending the validation complexity through the roof.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
next prev parent reply other threads:[~2016-08-09 12:04 UTC|newest]
Thread overview: 111+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-27 16:50 Luis R. Rodriguez
2016-07-27 17:26 ` Mark Brown
2016-07-27 17:58 ` Luis R. Rodriguez
2016-07-27 18:03 ` Mark Brown
2016-07-27 19:20 ` Luis R. Rodriguez
2016-07-28 0:54 ` Rafael J. Wysocki
2016-07-28 10:41 ` Laurent Pinchart
2016-07-28 10:54 ` Hans Verkuil
2016-07-28 11:03 ` Laurent Pinchart
2016-07-28 11:46 ` Jan Kara
2016-07-28 15:16 ` Mark Brown
2016-07-28 16:00 ` Laurent Pinchart
2016-08-02 8:32 ` Jan Kara
2016-08-03 14:17 ` Alexandre Belloni
2016-07-30 1:59 ` Steven Rostedt
2016-08-01 13:12 ` Laurent Pinchart
2016-07-28 20:12 ` Lars-Peter Clausen
2016-07-28 20:38 ` Mark Brown
2016-08-01 13:15 ` Laurent Pinchart
2016-07-28 14:36 ` Rafael J. Wysocki
2016-07-29 7:33 ` Hans Verkuil
2016-08-01 13:03 ` Laurent Pinchart
2016-08-01 13:17 ` Hans Verkuil
2016-08-04 8:22 ` Jani Nikula
2016-08-04 9:50 ` Greg KH
2016-08-04 10:20 ` Mark Brown
2016-08-04 10:27 ` Jani Nikula
2016-08-05 2:59 ` Rob Herring
2016-08-05 9:01 ` Arnd Bergmann
2016-08-05 10:54 ` Greg KH
2016-08-05 11:31 ` Andrzej Hajda
2016-08-05 11:58 ` Mark Brown
2016-08-05 13:43 ` Greg KH
2016-08-05 19:27 ` Rob Herring
2016-08-09 8:08 ` Daniel Vetter
2016-08-09 8:17 ` Greg KH
2016-08-09 12:04 ` Daniel Vetter [this message]
2016-08-04 12:37 ` Geert Uytterhoeven
2016-08-04 15:53 ` Mark Brown
2016-07-28 21:49 ` Lars-Peter Clausen
2016-07-29 3:50 ` Greg KH
2016-07-29 7:45 ` Hans Verkuil
2016-07-29 7:55 ` Lars-Peter Clausen
2016-08-01 13:06 ` Laurent Pinchart
2016-07-29 11:13 ` Mark Brown
2016-08-01 13:09 ` Laurent Pinchart
2016-08-01 13:14 ` Lars-Peter Clausen
2016-08-01 13:19 ` Laurent Pinchart
2016-08-01 13:21 ` Hans Verkuil
2016-08-01 13:26 ` Laurent Pinchart
2016-08-01 13:35 ` Hans Verkuil
2016-08-01 13:38 ` Laurent Pinchart
2016-08-01 13:51 ` Hans Verkuil
2016-08-01 17:15 ` Laurent Pinchart
2016-08-01 13:33 ` Lars-Peter Clausen
2016-08-01 13:55 ` Mauro Carvalho Chehab
2016-08-01 14:41 ` Lars-Peter Clausen
2016-08-01 14:44 ` Andrzej Hajda
2016-08-01 14:54 ` Lars-Peter Clausen
2016-08-01 15:20 ` Mark Brown
2016-08-01 15:34 ` Andrzej Hajda
2016-08-01 15:43 ` Lars-Peter Clausen
2016-08-01 16:18 ` Andrzej Hajda
2016-08-01 17:06 ` Mark Brown
2016-08-01 18:21 ` Lars-Peter Clausen
2016-08-02 11:45 ` Andrzej Hajda
2016-08-01 18:33 ` Andrzej Hajda
2016-08-01 18:48 ` Mark Brown
2016-08-01 19:42 ` Andrzej Hajda
2016-08-01 20:05 ` Lars-Peter Clausen
2016-08-02 8:57 ` Takashi Iwai
2016-08-01 17:40 ` Laurent Pinchart
2016-08-02 7:38 ` Greg KH
2016-08-01 19:03 ` Luis R. Rodriguez
2016-08-02 0:01 ` Rafael J. Wysocki
2016-08-02 0:56 ` Luis R. Rodriguez
2016-08-02 1:03 ` Dmitry Torokhov
2016-08-02 8:30 ` Jiri Kosina
2016-08-02 9:41 ` Hannes Reinecke
2016-08-02 9:48 ` Jiri Kosina
2016-08-02 11:50 ` Takashi Iwai
2016-08-09 9:57 ` Jörg Rödel
2016-08-09 16:08 ` James Bottomley
2016-08-09 16:11 ` James Bottomley
2016-08-09 16:51 ` Luis R. Rodriguez
2016-08-09 17:05 ` David Woodhouse
2016-08-09 17:12 ` James Bottomley
2016-08-09 16:53 ` Jörg Rödel
2016-08-09 18:06 ` Luis R. Rodriguez
2016-08-10 15:21 ` Jörg Rödel
2016-08-10 16:42 ` Luis R. Rodriguez
2016-08-10 21:37 ` Jörg Rödel
2016-08-12 7:33 ` Linus Walleij
2016-07-27 18:50 ` Dmitry Torokhov
2016-07-28 10:43 ` Marc Zyngier
2016-07-28 10:51 ` Laurent Pinchart
2016-07-28 23:43 ` Luis R. Rodriguez
2016-08-01 12:44 ` Laurent Pinchart
2016-07-28 11:18 ` Mauro Carvalho Chehab
2016-07-28 11:24 ` Laurent Pinchart
2016-07-28 12:25 ` Mauro Carvalho Chehab
2016-07-28 16:04 ` Laurent Pinchart
2016-07-29 0:00 ` Luis R. Rodriguez
2016-08-01 12:50 ` Laurent Pinchart
2016-08-01 20:32 ` Luis R. Rodriguez
2016-07-29 13:57 ` Andrzej Hajda
2016-09-07 16:40 ` Kevin Hilman
2016-08-01 14:03 ` Marek Szyprowski
2016-11-03 18:43 ` Laurent Pinchart
2016-11-04 6:53 ` Marek Szyprowski
2016-09-08 21:03 ` Frank Rowand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKMK7uFCjaKKUKn-DTUdsKOqWsAPaaZxVEkUXFZc=m0=82hyvw@mail.gmail.com' \
--to=daniel.vetter@ffwll.ch \
--cc=greg@kroah.com \
--cc=ksummit-discuss@lists.linuxfoundation.org \
--cc=m.szyprowski@samsung.com \
--cc=mchehab@osg.samsung.com \
--cc=rafael.j.wysocki@intel.com \
--cc=valentinrothberg@gmail.com \
--cc=vegard.nossum@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox