All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: [patch] udevd - cleanup and better timeout handling
Date: Mon, 26 Jan 2004 22:26:05 +0000	[thread overview]
Message-ID: <20040126222605.GA7107@kroah.com> (raw)
In-Reply-To: <20040125200314.GA8376@vrfy.org>

On Mon, Jan 26, 2004 at 08:42:44PM +0100, Kay Sievers wrote:
> On Mon, Jan 26, 2004 at 11:28:19AM -0800, Greg KH wrote:
> > On Mon, Jan 26, 2004 at 08:11:10PM +0100, Kay Sievers wrote:
> > > On Mon, Jan 26, 2004 at 10:22:34AM -0800, Greg KH wrote:
> > > > On Sun, Jan 25, 2004 at 09:03:14PM +0100, Kay Sievers wrote:
> > > 
> > > So if we can get threads in klibc, I would prefer to switch to sockets.
> > > IPC isn't really a  option for a todays program, but it works for us and
> > > sockets don't solve any big problem we have.
> > 
> > Where would we need threads to do this?  In udevsend?  Can't we just
> > send the message to the socket and forget about it there?
> 
> udevd need to be able to talk to multiple senders at the same time.

Hm, we can't use the same socket?  I need to read up on how that all
works...

> Otherwise a simple connect from a client blocks the whole process.
> 
> You may use select() for this and multiplex the connections, or fork
> a child and maintain the queue in shared memory. But that's all not
> really nice. I think threads are the nicest option, if you want sockets.

Ok, I'll trust you here :)

> > In udevd can't we just read the socket if any data is available?
> 
> No, it blocks, until the client sends, or we need to poll.

Even if you accept on a socket that has O_NONBLOCK set on it?

> > No, I do not think klibc will ever support them, and state machines are
> > much nicer than multi threaded apps (for the most part.)
> 
> What kind of state machine you are thinking of?
> How does it handle multiple client sockets. Do you mean a scheduler?

Hm, I don't know what kind of state machine I'm thinking of, usually you
can easily replace a program that has a lot of threads with a single one
using a state machine.  But I've also written stuff that can't be done
that way (accepting serial data from one thread, etc.)

> > If sockets don't really help much, I'll go add support to klibc for ipc...
> 
> I'm fine with it.
> We cant do it later if we want, when all the other problems are solved :)

That sounds fine with me :)

thanks,

greg k-h


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

  parent reply	other threads:[~2004-01-26 22:26 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-25 20:03 [patch] udevd - cleanup and better timeout handling Kay Sievers
2004-01-26 18:22 ` Greg KH
2004-01-26 19:11 ` Kay Sievers
2004-01-26 19:28 ` Greg KH
2004-01-26 19:42 ` Kay Sievers
2004-01-26 22:26 ` Greg KH [this message]
2004-01-26 22:56 ` Kay Sievers
2004-01-27  6:56 ` Kay Sievers
2004-01-27 18:55 ` Greg KH
2004-01-27 19:08 ` Kay Sievers
2004-01-27 19:13 ` Greg KH
2004-01-28 21:47 ` Kay Sievers
2004-01-29  1:52 ` Kay Sievers
2004-01-29  1:56 ` Kay Sievers
2004-01-29 15:55 ` Kay Sievers
2004-01-31  2:42 ` Kay Sievers
2004-02-01  9:08 ` Greg KH
2004-02-01 18:16 ` Kay Sievers
2004-02-02  2:19 ` Kay Sievers
2004-02-02  8:21 ` Greg KH
2004-02-02 11:50 ` Kay Sievers
2004-02-02 18:45 ` Greg KH
2004-02-02 21:36 ` Kay Sievers
2004-02-03  1:26 ` Greg KH
2004-02-03  6:43 ` Ling, Xiaofeng
2004-02-03 20:12 ` Kay Sievers
2004-02-04  0:56 ` Greg KH
2004-02-08  9:43 ` Olaf Hering
2004-02-08 15:22 ` Kay Sievers
2004-02-08 15:40 ` Olaf Hering
2004-02-08 15:57 ` Kay Sievers
2004-02-08 16:09 ` Olaf Hering

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=20040126222605.GA7107@kroah.com \
    --to=greg@kroah.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.