summaryrefslogtreecommitdiffstats
path: root/drivers/md/raid5.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2009-07-14 20:48:22 +0200
committerDan Williams <dan.j.williams@intel.com>2009-08-30 04:09:26 +0200
commit36d1c6476be51101778882897b315bd928c8c7b5 (patch)
tree55b4ecd93ce9c22722c9c9da0dd28a2d2f7c082d /drivers/md/raid5.h
parentmd/raid6: release spare page at ->stop() (diff)
downloadlinux-36d1c6476be51101778882897b315bd928c8c7b5.tar.xz
linux-36d1c6476be51101778882897b315bd928c8c7b5.zip
md/raid6: move the spare page to a percpu allocation
In preparation for asynchronous handling of raid6 operations move the spare page to a percpu allocation to allow multiple simultaneous synchronous raid6 recovery operations. Make this allocation cpu hotplug aware to maximize allocation efficiency. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/md/raid5.h')
-rw-r--r--drivers/md/raid5.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h
index 52ba99954dec..07a7a4102f05 100644
--- a/drivers/md/raid5.h
+++ b/drivers/md/raid5.h
@@ -383,8 +383,13 @@ struct raid5_private_data {
* (fresh device added).
* Cleared when a sync completes.
*/
-
- struct page *spare_page; /* Used when checking P/Q in raid6 */
+ /* per cpu variables */
+ struct raid5_percpu {
+ struct page *spare_page; /* Used when checking P/Q in raid6 */
+ } *percpu;
+#ifdef CONFIG_HOTPLUG_CPU
+ struct notifier_block cpu_notify;
+#endif
/*
* Free stripes pool