mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@engr.sgi.com>
To: Guillaume Thouvenin <guillaume.thouvenin@bull.net>
Cc: Andrew Morton <akpm@osdl.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Evgeniy Polyakov <johnpol@2ka.mipt.ru>,
	Jay Lan <jlan@engr.sgi.com>, Erich Focht <efocht@hpce.nec.com>,
	Ram <linuxram@us.ibm.com>, Gerrit Huizenga <gh@us.ibm.com>,
	elsa-devel <elsa-devel@lists.sourceforge.net>,
	Greg KH <greg@kroah.com>
Subject: Re: [patch 1/2] fork_connector: add a fork connector
Date: Thu, 17 Mar 2005 08:56:57 -0800	[thread overview]
Message-ID: <200503170856.57893.jbarnes@engr.sgi.com> (raw)
In-Reply-To: <1111050243.306.107.camel@frecb000711.frec.bull.fr>

On Thursday, March 17, 2005 1:04 am, Guillaume Thouvenin wrote:
> +static inline void fork_connector(pid_t parent, pid_t child)
> +{
> + static DEFINE_SPINLOCK(cn_fork_lock);
> + static __u32 seq;   /* used to test if message is lost */
> +
> + if (cn_fork_enable) {
> +  struct cn_msg *msg;
> +
> +  __u8 buffer[CN_FORK_MSG_SIZE];
> +
> +  msg = (struct cn_msg *)buffer;
> +
> +  memcpy(&msg->id, &cb_fork_id, sizeof(msg->id));
> +  spin_lock(&cn_fork_lock);
> +  msg->seq = seq++;
> +  spin_unlock(&cn_fork_lock);

As I mentioned before, this won't work very well on a large CPU count system.  
cn_fork_lock will be taken by each CPU everytime it does a fork, meaning that 
forks will be very slow if lots of CPUs are doing them at the same time.  Is 
there a more scalable way to ensure message delivery?

Jesse

  reply	other threads:[~2005-03-17 16:58 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-17  9:04 Guillaume Thouvenin
2005-03-17 16:56 ` Jesse Barnes [this message]
2005-03-17 21:38   ` Evgeniy Polyakov
2005-03-17 22:05     ` Jesse Barnes
2005-03-21  8:23       ` Guillaume Thouvenin
2005-03-21 12:48       ` Guillaume Thouvenin
2005-03-21 20:52         ` Ram
2005-03-22  4:36           ` Evgeniy Polyakov
2005-03-22 18:40             ` Ram
2005-03-22  7:07           ` Guillaume Thouvenin
2005-03-22 18:15             ` Jay Lan
2005-03-23  8:15               ` Guillaume Thouvenin
2005-03-22 18:26             ` Ram
2005-03-22 19:22               ` Evgeniy Polyakov
2005-03-22 19:18                 ` Ram
2005-03-22 20:25                   ` Evgeniy Polyakov
2005-03-22 20:42                     ` Ram
2005-03-23  4:52                       ` Evgeniy Polyakov
2005-03-22 22:51                   ` Jay Lan
2005-03-22 23:51                 ` Jay Lan
2005-03-23  5:01                   ` Evgeniy Polyakov
     [not found]                     ` <1111557106.23532.65.camel@uganda>
2005-03-23 19:00                       ` Ram
2005-03-25 10:03 Guillaume Thouvenin
2005-03-25 22:45 ` dean gaudet
2005-03-28 21:42 ` Paul Jackson
2005-03-29  7:04   ` Evgeniy Polyakov
2005-03-29  7:02     ` Greg KH
2005-03-29  7:10       ` Evgeniy Polyakov
2005-03-29  8:49     ` Paul Jackson
2005-03-29  9:17       ` Guillaume Thouvenin
2005-03-29 15:23         ` Paul Jackson
2005-03-29 18:44           ` Jay Lan
2005-03-30  1:05             ` Paul Jackson
2005-03-30  5:39           ` Guillaume Thouvenin
2005-03-30  6:35             ` Paul Jackson
2005-03-30 10:25               ` Herbert Xu
2005-03-30 10:57                 ` Evgeniy Polyakov
2005-03-30 11:01                 ` Guillaume Thouvenin
2005-04-01  3:26           ` Drew Hess
2005-03-29 10:29       ` Evgeniy Polyakov
2005-03-29 17:03         ` Paul Jackson
2005-03-29 21:09           ` Jay Lan
2005-03-29 22:01             ` Paul Jackson
2005-03-30 14:14               ` Evgeniy Polyakov
2005-03-30 20:56                 ` Paul Jackson
2005-03-30  6:06             ` dean gaudet
2005-03-30  6:25               ` Paul Jackson
2005-03-30  6:38               ` Guillaume Thouvenin
2005-03-30 18:11               ` Jay Lan
2005-03-29  8:05   ` Guillaume Thouvenin
2005-03-29 14:47     ` Paul Jackson
2005-03-29 12:51   ` Guillaume Thouvenin
2005-03-29 15:35     ` Paul Jackson
2005-03-30  5:52       ` Guillaume Thouvenin
2005-03-30  6:41         ` Paul Jackson

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=200503170856.57893.jbarnes@engr.sgi.com \
    --to=jbarnes@engr.sgi.com \
    --cc=akpm@osdl.org \
    --cc=efocht@hpce.nec.com \
    --cc=elsa-devel@lists.sourceforge.net \
    --cc=gh@us.ibm.com \
    --cc=greg@kroah.com \
    --cc=guillaume.thouvenin@bull.net \
    --cc=jlan@engr.sgi.com \
    --cc=johnpol@2ka.mipt.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxram@us.ibm.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

Powered by JetHome