All of lore.kernel.org
 help / color / mirror / Atom feed
From: therbert@google.com (Tom Herbert)
To: davem@davemloft.net, netdev@vger.kernel.org
Subject: RFC [PATCH net-2.6 2/6] net: Changes to x86_64 for softirq scheduling
Date: Wed,  5 Mar 2008 12:51:16 -0800 (PST)	[thread overview]
Message-ID: <20080305205116.5B86741278F@localhost> (raw)

This patches includes changes to x86_64 to support scheduling of softirq's between CPUs.

Signed-off-by: Tom Herbert <therbert@google.com>

---

diff -uprN -X /tmp/donts/si_2 net-2.6/arch/x86/kernel/smp_64.c net-2.6.patch/arch/x86/kernel/smp_64.c
--- net-2.6/arch/x86/kernel/smp_64.c	2008-03-05 09:02:22.768649000 -0800
+++ net-2.6.patch/arch/x86/kernel/smp_64.c	2008-03-05 09:25:33.403752000 -0800
@@ -296,6 +296,15 @@ void smp_send_reschedule(int cpu)
 }
 
 /*
+ * this function sends a 'reschedule' IPI to multiple
+ * CPUs in the mask.
+ */
+void smp_send_reschedule_mask(cpumask_t mask)
+{
+	send_IPI_mask(mask, RESCHEDULE_VECTOR);
+}
+
+/*
  * Structure and data for smp_call_function(). This is designed to minimise
  * static memory requirements. It also looks cleaner.
  */
@@ -494,11 +503,20 @@ void smp_send_stop(void)
  * Reschedule call back. Nothing to do,
  * all the work is done automatically when
  * we return from the interrupt.
+ * Reschedule call back.  Process rescheduling is done
+ * automatically on return from interrupt.  Also, 'or' into
+ * local_softirq_pending any softirq scheduling requests sent
+ * from other CPUs, these softirq's will execute in irq_exit.
  */
 asmlinkage void smp_reschedule_interrupt(void)
 {
 	ack_APIC_irq();
+
+	exit_idle();
+	irq_enter();
+	or_alt_softirqs_pending_irqoff();
 	add_pda(irq_resched_count, 1);
+	irq_exit();
 }
 
 asmlinkage void smp_call_function_interrupt(void)
diff -uprN -X /tmp/donts/si_2 net-2.6/include/asm-x86/smp_64.h net-2.6.patch/include/asm-x86/smp_64.h
--- net-2.6/include/asm-x86/smp_64.h	2008-03-05 09:03:19.005115000 -0800
+++ net-2.6.patch/include/asm-x86/smp_64.h	2008-03-05 09:27:32.532262000 -0800
@@ -74,6 +74,9 @@ static inline int num_booting_cpus(void)
 }
 
 extern void smp_send_reschedule(int cpu);
+extern void smp_send_reschedule_mask(cpumask_t mask);
+#define       ARCH_HAS_SEND_RESCHEDULE_MASK
+
 
 #else /* CONFIG_SMP */
 

                 reply	other threads:[~2008-03-05 20:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20080305205116.5B86741278F@localhost \
    --to=therbert@google.com \
    --cc=davem@davemloft.net \
    --cc=netdev@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.