summaryrefslogtreecommitdiffstats
path: root/include/linux/smp.h
diff options
context:
space:
mode:
authorChristoph Hellwig2014-01-31 00:45:47 +0100
committerLinus Torvalds2014-01-31 01:56:54 +0100
commit6897fc22ea01b562b55c6168592bcbd3ee62b006 (patch)
tree034c4b774880c2bbf8a9347acef749478a3443b0 /include/linux/smp.h
parentdrivers/net/phy/mdio_bus.c: call put_device on device_register() failure (diff)
downloadkernel-qcow2-linux-6897fc22ea01b562b55c6168592bcbd3ee62b006.tar.gz
kernel-qcow2-linux-6897fc22ea01b562b55c6168592bcbd3ee62b006.tar.xz
kernel-qcow2-linux-6897fc22ea01b562b55c6168592bcbd3ee62b006.zip
kernel: use lockless list for smp_call_function_single
Make smp_call_function_single and friends more efficient by using a lockless list. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jan Kara <jack@suse.cz> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/smp.h')
-rw-r--r--include/linux/smp.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/smp.h b/include/linux/smp.h
index 5da22ee42e16..3834f43f9993 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -11,12 +11,16 @@
#include <linux/list.h>
#include <linux/cpumask.h>
#include <linux/init.h>
+#include <linux/llist.h>
extern void cpu_idle(void);
typedef void (*smp_call_func_t)(void *info);
struct call_single_data {
- struct list_head list;
+ union {
+ struct list_head list;
+ struct llist_node llist;
+ };
smp_call_func_t func;
void *info;
u16 flags;