All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: [PATCH] convert udevsend/udevd to DGRAM and single-threaded
Date: Sat, 07 Feb 2004 10:06:03 +0000	[thread overview]
Message-ID: <20040207100603.GA7365@vrfy.org> (raw)
In-Reply-To: <40232F58.3040404@sympatico.ca>

[-- Attachment #1: Type: text/plain, Size: 678 bytes --]

On Fri, Feb 06, 2004 at 02:21:44PM -0800, Greg KH wrote:
> On Fri, Feb 06, 2004 at 12:27:55PM +0100, Kay Sievers wrote:
> > On Fri, Feb 06, 2004 at 01:08:24AM -0500, Chris Friesen wrote:
> > > 
> > > Kay, you said "unless we can get rid of _all_ the threads or at least
> > > getting faster, I don't want to change it."
> > > 
> > > Well how about we get rid of all the threads, *and* we get faster?
> > 
> > Yes, we are twice as fast now on my box :)
> 
> Very nice, thanks a lot Chris.

I tried to compile udevd with klibc. Here are the neccessary changes to
compile it, but I doesn't work well now. There seems to be a issue with
the signal handling in klibc.
Any idea?

Kay

[-- Attachment #2: 01-udevd-klibc.patch --]
[-- Type: text/plain, Size: 1431 bytes --]

===== udevd.c 1.15 vs edited =====
--- 1.15/udevd.c	Fri Feb  6 13:02:10 2004
+++ edited/udevd.c	Sat Feb  7 10:49:54 2004
@@ -279,6 +279,7 @@
 	struct sockaddr_un saddr;
 	socklen_t addrlen;
 	int retval;
+	struct sigaction act;
 
 	init_logging("udevd");
 
@@ -288,8 +289,12 @@
 	signal(SIGCHLD, sig_handler);
 
 	/* we want these two to interrupt system calls */
-	siginterrupt(SIGALRM, 1);
-	siginterrupt(SIGCHLD, 1);
+	sigaction(SIGALRM, NULL, &act);
+	act.sa_flags &= ~SA_RESTART;
+	sigaction(SIGALRM, &act, NULL);
+	sigaction(SIGCHLD, NULL, &act);
+	act.sa_flags &= ~SA_RESTART;
+	sigaction(SIGCHLD, &act, NULL);
 
 	memset(&saddr, 0x00, sizeof(saddr));
 	saddr.sun_family = AF_LOCAL;
@@ -304,7 +309,7 @@
 	}
 
 	/* the bind takes care of ensuring only one copy running */
-	retval = bind(ssock, &saddr, addrlen);
+	retval = bind(ssock, (struct sockaddr *) &saddr, addrlen);
 	if (retval < 0) {
 		dbg("bind failed\n");
 		goto exit;
===== udevsend.c 1.18 vs edited =====
--- 1.18/udevsend.c	Fri Feb  6 11:54:08 2004
+++ edited/udevsend.c	Sat Feb  7 10:41:13 2004
@@ -174,7 +174,7 @@
 	/* If we can't send, try to start daemon and resend message */
 	loop = UDEVSEND_CONNECT_RETRY;
 	while (loop--) {
-		retval = sendto(sock, &message, size, 0, (struct sockaddr*)&saddr, addrlen);
+		retval = sendto(sock, &message, size, 0, (struct sockaddr *)&saddr, addrlen);
 		if (retval != -1) {
 			retval = 0;
 			goto close_and_exit;

      parent reply	other threads:[~2004-02-07 10:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-06  6:08 [PATCH] convert udevsend/udevd to DGRAM and single-threaded Chris Friesen
2004-02-06 11:27 ` Kay Sievers
2004-02-06 16:03 ` Robert Love
2004-02-06 16:58 ` Patrick Mansfield
2004-02-06 22:21 ` Greg KH
2004-02-06 22:22 ` Chris Friesen
2004-02-07  1:24 ` Patrick Mansfield
2004-02-07  2:04 ` Mike Waychison
2004-02-07  7:06 ` Chris Friesen
2004-02-07  7:32 ` Patrick Mansfield
2004-02-07 10:06 ` Kay Sievers [this message]

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=20040207100603.GA7365@vrfy.org \
    --to=kay.sievers@vrfy.org \
    --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.