All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ashok Raj <ashok.raj@intel.com>
To: ak@muc.de
Cc: zwane@arm.linux.org.uk, discuss@x86-64.org, shaohua.li@intel.com,
	linux-kernel@vger.kernel.org
Subject: [patch 4/4] CPU hot-plug support for x86_64
Date: Fri, 20 May 2005 15:16:26 -0700	[thread overview]
Message-ID: <20050520223418.208677000@csdlinux-2.jf.intel.com> (raw)
In-Reply-To: 20050520221622.124069000@csdlinux-2.jf.intel.com

[-- Attachment #1: remove_ipi_shortcut.patch --]
[-- Type: text/plain, Size: 1433 bytes --]

This patch removes the usage of shortcut to send smp_call_function using ALL_BUT_SELF 
shortcut.  This is a problem for an upcomming CPU, and is still not ready to take
this interrupt. Since cpu_online_map is updated with the call_lock held, this 
mechanism should avoid sending IPI to cpu's not yet prepared to participate in this
party.

Signed-off-by: Ashok Raj <ashok.raj@intel.com>
----------------------------------------
 smp.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

Index: linux-2.6.12-rc4-mm2/arch/x86_64/kernel/smp.c
===================================================================
--- linux-2.6.12-rc4-mm2.orig/arch/x86_64/kernel/smp.c	2005-05-20 13:14:27.000000000 -0700
+++ linux-2.6.12-rc4-mm2/arch/x86_64/kernel/smp.c	2005-05-20 13:14:38.000000000 -0700
@@ -315,8 +315,10 @@
 				int nonatomic, int wait)
 {
 	struct call_data_struct data;
-	int cpus = num_online_cpus()-1;
+	cpumask_t cpu_mask;
+	int cpus;
 
+	cpus = num_online_cpus() - 1;
 	if (!cpus)
 		return;
 
@@ -327,10 +329,14 @@
 	if (wait)
 		atomic_set(&data.finished, 0);
 
+	cpu_mask = cpu_online_map;
+	cpu_clear(smp_processor_id(), cpu_mask);
+
 	call_data = &data;
 	wmb();
+
 	/* Send a message to all other CPUs and wait for them to respond */
-	send_IPI_allbutself(CALL_FUNCTION_VECTOR);
+	send_IPI_mask(cpu_mask, CALL_FUNCTION_VECTOR);
 
 	/* Wait for response */
 	while (atomic_read(&data.started) != cpus)

--

  parent reply	other threads:[~2005-05-20 22:39 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-20 22:16 [patch 0/4] CPU hot-plug support for x86_64 Ashok Raj
2005-05-20 22:16 ` [patch 1/4] " Ashok Raj
2005-05-20 22:16 ` [patch 2/4] " Ashok Raj
2005-05-23 16:38   ` Andi Kleen
2005-05-23 16:58     ` Ashok Raj
2005-05-23 17:24       ` Andi Kleen
2005-05-23 17:32         ` Ashok Raj
2005-05-23 19:37     ` Rafael J. Wysocki
2005-05-24 11:49       ` Andi Kleen
2005-05-20 22:16 ` [patch 3/4] " Ashok Raj
2005-05-20 22:16 ` Ashok Raj [this message]
2005-05-23 16:40 ` [patch 0/4] " Andi Kleen
2005-05-23 16:54   ` Ashok Raj
2005-05-23 17:12     ` Andi Kleen
2005-05-23 17:40       ` [discuss] " Ashok Raj
2005-05-24  5:46         ` Srivatsa Vaddagiri
2005-05-24  6:01           ` Ashok Raj
2005-05-24  8:53             ` Srivatsa Vaddagiri
2005-05-24 18:17               ` Andi Kleen
2005-05-24 11:50           ` Andi Kleen
2005-05-24 11:48         ` Andi Kleen
2005-05-24 17:01           ` Srivatsa Vaddagiri

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=20050520223418.208677000@csdlinux-2.jf.intel.com \
    --to=ashok.raj@intel.com \
    --cc=ak@muc.de \
    --cc=discuss@x86-64.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shaohua.li@intel.com \
    --cc=zwane@arm.linux.org.uk \
    /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.