diff options
| author | Christoph Hellwig <hch@infradead.org> | 2014-01-30 18:45:47 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-30 19:56:54 -0500 |
| commit | 6897fc22ea01b562b55c6168592bcbd3ee62b006 (patch) | |
| tree | 034c4b774880c2bbf8a9347acef749478a3443b0 /include/linux | |
| parent | 0c692d07842a67d9aa6b8266a80e4ac460a5c1a2 (diff) | |
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')
| -rw-r--r-- | include/linux/blkdev.h | 5 | ||||
| -rw-r--r-- | include/linux/smp.h | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 0375654adb28..8678c4322b44 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -95,10 +95,7 @@ enum rq_cmd_type_bits { | |||
| 95 | * as well! | 95 | * as well! |
| 96 | */ | 96 | */ |
| 97 | struct request { | 97 | struct request { |
| 98 | union { | 98 | struct list_head queuelist; |
| 99 | struct list_head queuelist; | ||
| 100 | struct llist_node ll_list; | ||
| 101 | }; | ||
| 102 | union { | 99 | union { |
| 103 | struct call_single_data csd; | 100 | struct call_single_data csd; |
| 104 | struct work_struct mq_flush_data; | 101 | struct work_struct mq_flush_data; |
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 @@ | |||
| 11 | #include <linux/list.h> | 11 | #include <linux/list.h> |
| 12 | #include <linux/cpumask.h> | 12 | #include <linux/cpumask.h> |
| 13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
| 14 | #include <linux/llist.h> | ||
| 14 | 15 | ||
| 15 | extern void cpu_idle(void); | 16 | extern void cpu_idle(void); |
| 16 | 17 | ||
| 17 | typedef void (*smp_call_func_t)(void *info); | 18 | typedef void (*smp_call_func_t)(void *info); |
| 18 | struct call_single_data { | 19 | struct call_single_data { |
| 19 | struct list_head list; | 20 | union { |
| 21 | struct list_head list; | ||
| 22 | struct llist_node llist; | ||
| 23 | }; | ||
| 20 | smp_call_func_t func; | 24 | smp_call_func_t func; |
| 21 | void *info; | 25 | void *info; |
| 22 | u16 flags; | 26 | u16 flags; |
