From: Andrew Morton <andrewm@uow.edu.au>
To: linux-hotplug@vger.kernel.org
Subject: Re: multiple events
Date: Sun, 21 Jan 2001 12:49:22 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-98008089805161@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-98007936002998@msgid-missing>
Oliver Neukum wrote:
>
> On Sonntag, 21. Januar 2001 13:29, Andrew Morton wrote:
> > Oliver Neukum wrote:
> > > Hi list,
> > >
> > > I was looking through the kmod code and was wondering about the context
> > > /sbin/hotplug is run.
> > >
> > > It seems to be run in the context of keventd. Does this mean that there
> > > can only be one instance of /sbin/hotplug at a time ?
> >
> > No, /sbin/hotplug is run asynchronously, so multiple instances
> > can and will be run concurrently. A fix exists, but I'm still
> > trying to get my head around whether there's justification
> > for asking for its inclusion.
>
> Does this mean that "add" might race with "remove" ?
Yes, easily. Cardbus devices can still generate several events
quickly due to contact bounce.
> On the other hand, if you go for serialisation, is there a possibilty of a
> deadlock ?
> device 1 -> hotplug -> module loaded -> device 2 registered -> hotplug ->
> DEADLOCK
You need to be careful with deadlocks. But it's OK with netdevices
on cardbus and can probably be sorted out for other combinations.
Actually, global serialisation of hotplug events would be a good thing to have.
I guess this could be done in userspace.
Which begs the question: why is the kernel running /sbin/hotplug at all?
It would be better if the strings were squirted out to a daemon across a
pipe or whatever, I suspect. I wasn't involved in those discussions - I
may have missed something vital.
Maybe /sbin/hotplug should just send a message to hotplugd and let
hotplugd do all the serialisation?
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next prev parent reply other threads:[~2001-01-21 12:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-21 12:17 multiple events Oliver Neukum
2001-01-21 12:29 ` Andrew Morton
2001-01-21 12:33 ` Oliver Neukum
2001-01-21 12:49 ` Andrew Morton [this message]
2001-01-21 18:37 ` David Brownell
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=marc-linux-hotplug-98008089805161@msgid-missing \
--to=andrewm@uow.edu.au \
--cc=linux-hotplug@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;
as well as URLs for NNTP newsgroup(s).