public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Javier Pello <javier.pello@urjc.es>
To: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>,
	linux-kernel@vger.kernel.org, Greg KH <greg@kroah.com>
Subject: Re: [PATCH] request_firmware: skip timeout if userspace was not  notified
Date: Tue, 07 Aug 2007 14:47:02 +0200	[thread overview]
Message-ID: <46B869C6.3090708@urjc.es> (raw)
In-Reply-To: <20070807141030.1bb0f76a@gondolin.boeblingen.de.ibm.com>

On Tue, 07 Aug 2007, Cornelia Huck wrote:

> On Tue, 7 Aug 2007 13:46:55 +0200,
> "Kay Sievers" <kay.sievers@vrfy.org> wrote:
> > How do you check if events have been "handled"? None of the recent
> > distros uses /sbin/hotplug anymore. Netlink events are broadcasted,
> > but no failure in delivery doesn't mean anything like "handled", or
> > delivered to the right instance. Even if you check that the netlink
> > socket has listeners, that wouldn't be sufficient to tell that is
> > handled.
> 
> You can't check if it's been handled, yes; but you can certainly check
> if you delivered it. I guess Javier wants to exclude the cases where
> userspace didn't have any chance to handle it.

That's right. There's no way to know if userspace does handle the event
after reception, and that's why we have a timeout (so we don't wait
forever), but we can be sure that userspace won't handle an event that
wasn't received. We want to be conservative here: if there is any
chance that the event was received, we set the timeout and wait.

> Javier: Do you have an idea how common the case "we broadcasted, but
> nobody listened so we got a timeout" is? If the usual reason for the
> timeout is that firmware was requested before a listener showed up,
> I'm not sure whether that check is worth it...

I don't know how common this is in general, but in my box it happens
(or rather happened, until I patched it) once per boot. I've got a
device that requires some firmware during initialisation. I always
build the driver into the kernel (I don't like modules for things
that are permanently attached to the computer), and that means that
it tries to initialise before the rootfs is mounted (there's no
initramfs). Before the patch, the kernel would hang for a minute
in request_firmware during each boot, which was rather annoying,
and that is the reason why I decided to fix it.

Javier



  parent reply	other threads:[~2007-08-07 12:46 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-03 19:07 [PATCH] request_firmware: skip timeout if userspace was not notified Javier Pello
2007-08-04  5:21 ` david
2007-08-04  8:50   ` Javier Pello
2007-08-04 17:09     ` david
2007-08-04 21:20       ` Javier Pello
2007-08-06 12:24 ` Cornelia Huck
2007-08-06 20:23   ` Javier Pello
     [not found]     ` <20070807125844.4d756b04@gondo lin.boeblingen.de.ibm.com>
2007-08-07 10:58     ` Cornelia Huck
2007-08-07 11:46       ` Kay Sievers
2007-08-07 12:10         ` Cornelia Huck
2007-08-07 12:31           ` Kay Sievers
2007-08-07 12:48             ` Cornelia Huck
2007-08-07 12:47           ` Javier Pello [this message]
2007-08-07 12:57             ` Kay Sievers
2007-08-07 13:15               ` Cornelia Huck
2007-08-07 13:59               ` Javier Pello
2007-08-07 14:08                 ` Kay Sievers
2007-08-07 14:38                   ` Cornelia Huck
2007-08-09  9:13                   ` Javier Pello
2007-08-09  9:21                     ` Kay Sievers
2007-08-09  9:26                     ` Cornelia Huck
2007-08-07 14:26                 ` Cornelia Huck
2007-08-09  9:36                   ` Javier Pello
2007-08-09 11:58                     ` Kay Sievers
2007-08-10 21:24                       ` Javier Pello
2007-08-11 13:26                         ` Kay Sievers
2007-08-07 20:05 ` Andrew Morton

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=46B869C6.3090708@urjc.es \
    --to=javier.pello@urjc.es \
    --cc=cornelia.huck@de.ibm.com \
    --cc=greg@kroah.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    /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