All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anton Blanchard <anton@samba.org>
To: Jens Axboe <jens.axboe@oracle.com>, Ingo Molnar <mingo@elte.hu>
Cc: miltonm@bga.com, linux-kernel@vger.kernel.org
Subject: [PATCH] generic-ipi: Use DEFINE_PER_CPU_SHARED_ALIGNED for IPI data
Date: Mon, 18 Jan 2010 13:00:51 +1100	[thread overview]
Message-ID: <20100118020051.GR12666@kryten> (raw)

From: Milton Miller <miltonm@bga.com>

The smp ipi data is passed around and given write access by other cpus
and should be seperated from per-cpu data consumed by this cpu.

Looking for hot lines, I saw call_function_data shared with tick_cpu_sched.

Signed-off-by: Milton Miller <miltonm@bga.com>
Acked-by: Anton Blanchard <anton@samba.org>
---

Index: linux.trees.git/kernel/smp.c
===================================================================
--- linux.trees.git.orig/kernel/smp.c	2010-01-18 12:41:28.000000000 +1100
+++ linux.trees.git/kernel/smp.c	2010-01-18 12:47:42.000000000 +1100
@@ -12,8 +12,6 @@
 #include <linux/smp.h>
 #include <linux/cpu.h>
 
-static DEFINE_PER_CPU(struct call_single_queue, call_single_queue);
-
 static struct {
 	struct list_head	queue;
 	raw_spinlock_t		lock;
@@ -33,12 +31,14 @@ struct call_function_data {
 	cpumask_var_t		cpumask;
 };
 
+static DEFINE_PER_CPU_SHARED_ALIGNED(struct call_function_data, cfd_data);
+
 struct call_single_queue {
 	struct list_head	list;
 	raw_spinlock_t		lock;
 };
 
-static DEFINE_PER_CPU(struct call_function_data, cfd_data);
+static DEFINE_PER_CPU_SHARED_ALIGNED(struct call_single_queue, call_single_queue);
 
 static int
 hotplug_cfd(struct notifier_block *nfb, unsigned long action, void *hcpu)
@@ -256,7 +256,7 @@ void generic_smp_call_function_single_in
 	}
 }
 
-static DEFINE_PER_CPU(struct call_single_data, csd_data);
+static DEFINE_PER_CPU_SHARED_ALIGNED(struct call_single_data, csd_data);
 
 /*
  * smp_call_function_single - Run a function on a specific CPU

             reply	other threads:[~2010-01-18  2:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-18  2:00 Anton Blanchard [this message]
2010-01-18  7:27 ` [PATCH] generic-ipi: Use DEFINE_PER_CPU_SHARED_ALIGNED for IPI data Jens Axboe
2010-01-19 14:22 ` [tip:core/ipi] generic-ipi: Optimize accesses by using " tip-bot for Milton Miller

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=20100118020051.GR12666@kryten \
    --to=anton@samba.org \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miltonm@bga.com \
    --cc=mingo@elte.hu \
    /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.