diff options
author | Asai Thambi S P <asamymuthupa@micron.com> | 2012-12-20 10:46:25 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-01-11 08:38:57 -0500 |
commit | 16c906e51c6f08a15763a85b5686e1ded35e77ab (patch) | |
tree | 19973c1d6187ba167a2b9de49bd071120a71ae6c /drivers/block/mtip32xx/mtip32xx.h | |
parent | 9931faca02c604c22335f5a935a501bb2ace6e20 (diff) |
mtip32xx: Add workqueue and NUMA support
This patch contains
* parallel command completion using workers
* bind the workers to the chosen numa node
* bind isr to the chosen numa node
* allocating memory in the chosen numa node
Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com>
Signed-off-by: Sam Bradshaw <sbradshaw@micron.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/mtip32xx/mtip32xx.h')
-rw-r--r-- | drivers/block/mtip32xx/mtip32xx.h | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/drivers/block/mtip32xx/mtip32xx.h b/drivers/block/mtip32xx/mtip32xx.h index b1742640556a..d782b1aa913e 100644 --- a/drivers/block/mtip32xx/mtip32xx.h +++ b/drivers/block/mtip32xx/mtip32xx.h | |||
@@ -164,6 +164,20 @@ struct smart_attr { | |||
164 | u8 res[3]; | 164 | u8 res[3]; |
165 | } __packed; | 165 | } __packed; |
166 | 166 | ||
167 | struct mtip_work { | ||
168 | struct work_struct work; | ||
169 | void *port; | ||
170 | int cpu_binding; | ||
171 | u32 completed; | ||
172 | } ____cacheline_aligned_in_smp; | ||
173 | |||
174 | #define DEFINE_HANDLER(group) \ | ||
175 | void mtip_workq_sdbf##group(struct work_struct *work) \ | ||
176 | { \ | ||
177 | struct mtip_work *w = (struct mtip_work *) work; \ | ||
178 | mtip_workq_sdbfx(w->port, group, w->completed); \ | ||
179 | } | ||
180 | |||
167 | /* Register Frame Information Structure (FIS), host to device. */ | 181 | /* Register Frame Information Structure (FIS), host to device. */ |
168 | struct host_to_dev_fis { | 182 | struct host_to_dev_fis { |
169 | /* | 183 | /* |
@@ -424,7 +438,7 @@ struct mtip_port { | |||
424 | */ | 438 | */ |
425 | struct semaphore cmd_slot; | 439 | struct semaphore cmd_slot; |
426 | /* Spinlock for working around command-issue bug. */ | 440 | /* Spinlock for working around command-issue bug. */ |
427 | spinlock_t cmd_issue_lock; | 441 | spinlock_t cmd_issue_lock[MTIP_MAX_SLOT_GROUPS]; |
428 | }; | 442 | }; |
429 | 443 | ||
430 | /* | 444 | /* |
@@ -447,9 +461,6 @@ struct driver_data { | |||
447 | 461 | ||
448 | struct mtip_port *port; /* Pointer to the port data structure. */ | 462 | struct mtip_port *port; /* Pointer to the port data structure. */ |
449 | 463 | ||
450 | /* Tasklet used to process the bottom half of the ISR. */ | ||
451 | struct tasklet_struct tasklet; | ||
452 | |||
453 | unsigned product_type; /* magic value declaring the product type */ | 464 | unsigned product_type; /* magic value declaring the product type */ |
454 | 465 | ||
455 | unsigned slot_groups; /* number of slot groups the product supports */ | 466 | unsigned slot_groups; /* number of slot groups the product supports */ |
@@ -461,6 +472,18 @@ struct driver_data { | |||
461 | struct task_struct *mtip_svc_handler; /* task_struct of svc thd */ | 472 | struct task_struct *mtip_svc_handler; /* task_struct of svc thd */ |
462 | 473 | ||
463 | struct dentry *dfs_node; | 474 | struct dentry *dfs_node; |
475 | |||
476 | int numa_node; /* NUMA support */ | ||
477 | |||
478 | char workq_name[32]; | ||
479 | |||
480 | struct workqueue_struct *isr_workq; | ||
481 | |||
482 | struct mtip_work work[MTIP_MAX_SLOT_GROUPS]; | ||
483 | |||
484 | atomic_t irq_workers_active; | ||
485 | |||
486 | int isr_binding; | ||
464 | }; | 487 | }; |
465 | 488 | ||
466 | #endif | 489 | #endif |