diff options
-rw-r--r-- | drivers/md/Kconfig | 11 | ||||
-rw-r--r-- | drivers/md/raid5.c | 38 |
2 files changed, 1 insertions, 48 deletions
diff --git a/drivers/md/Kconfig b/drivers/md/Kconfig index 91a02eeeb319..9a10313d0670 100644 --- a/drivers/md/Kconfig +++ b/drivers/md/Kconfig | |||
@@ -154,17 +154,6 @@ config MD_RAID456 | |||
154 | 154 | ||
155 | If unsure, say Y. | 155 | If unsure, say Y. |
156 | 156 | ||
157 | config MULTICORE_RAID456 | ||
158 | bool "RAID-4/RAID-5/RAID-6 Multicore processing (EXPERIMENTAL)" | ||
159 | depends on MD_RAID456 | ||
160 | depends on SMP | ||
161 | depends on EXPERIMENTAL | ||
162 | ---help--- | ||
163 | Enable the raid456 module to dispatch per-stripe raid operations to a | ||
164 | thread pool. | ||
165 | |||
166 | If unsure, say N. | ||
167 | |||
168 | config MD_MULTIPATH | 157 | config MD_MULTIPATH |
169 | tristate "Multipath I/O support" | 158 | tristate "Multipath I/O support" |
170 | depends on BLK_DEV_MD | 159 | depends on BLK_DEV_MD |
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 19d77a026639..35031c8b2d02 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -1406,7 +1406,7 @@ static void ops_run_check_pq(struct stripe_head *sh, struct raid5_percpu *percpu | |||
1406 | &sh->ops.zero_sum_result, percpu->spare_page, &submit); | 1406 | &sh->ops.zero_sum_result, percpu->spare_page, &submit); |
1407 | } | 1407 | } |
1408 | 1408 | ||
1409 | static void __raid_run_ops(struct stripe_head *sh, unsigned long ops_request) | 1409 | static void raid_run_ops(struct stripe_head *sh, unsigned long ops_request) |
1410 | { | 1410 | { |
1411 | int overlap_clear = 0, i, disks = sh->disks; | 1411 | int overlap_clear = 0, i, disks = sh->disks; |
1412 | struct dma_async_tx_descriptor *tx = NULL; | 1412 | struct dma_async_tx_descriptor *tx = NULL; |
@@ -1471,36 +1471,6 @@ static void __raid_run_ops(struct stripe_head *sh, unsigned long ops_request) | |||
1471 | put_cpu(); | 1471 | put_cpu(); |
1472 | } | 1472 | } |
1473 | 1473 | ||
1474 | #ifdef CONFIG_MULTICORE_RAID456 | ||
1475 | static void async_run_ops(void *param, async_cookie_t cookie) | ||
1476 | { | ||
1477 | struct stripe_head *sh = param; | ||
1478 | unsigned long ops_request = sh->ops.request; | ||
1479 | |||
1480 | clear_bit_unlock(STRIPE_OPS_REQ_PENDING, &sh->state); | ||
1481 | wake_up(&sh->ops.wait_for_ops); | ||
1482 | |||
1483 | __raid_run_ops(sh, ops_request); | ||
1484 | release_stripe(sh); | ||
1485 | } | ||
1486 | |||
1487 | static void raid_run_ops(struct stripe_head *sh, unsigned long ops_request) | ||
1488 | { | ||
1489 | /* since handle_stripe can be called outside of raid5d context | ||
1490 | * we need to ensure sh->ops.request is de-staged before another | ||
1491 | * request arrives | ||
1492 | */ | ||
1493 | wait_event(sh->ops.wait_for_ops, | ||
1494 | !test_and_set_bit_lock(STRIPE_OPS_REQ_PENDING, &sh->state)); | ||
1495 | sh->ops.request = ops_request; | ||
1496 | |||
1497 | atomic_inc(&sh->count); | ||
1498 | async_schedule(async_run_ops, sh); | ||
1499 | } | ||
1500 | #else | ||
1501 | #define raid_run_ops __raid_run_ops | ||
1502 | #endif | ||
1503 | |||
1504 | static int grow_one_stripe(struct r5conf *conf) | 1474 | static int grow_one_stripe(struct r5conf *conf) |
1505 | { | 1475 | { |
1506 | struct stripe_head *sh; | 1476 | struct stripe_head *sh; |
@@ -1509,9 +1479,6 @@ static int grow_one_stripe(struct r5conf *conf) | |||
1509 | return 0; | 1479 | return 0; |
1510 | 1480 | ||
1511 | sh->raid_conf = conf; | 1481 | sh->raid_conf = conf; |
1512 | #ifdef CONFIG_MULTICORE_RAID456 | ||
1513 | init_waitqueue_head(&sh->ops.wait_for_ops); | ||
1514 | #endif | ||
1515 | 1482 | ||
1516 | spin_lock_init(&sh->stripe_lock); | 1483 | spin_lock_init(&sh->stripe_lock); |
1517 | 1484 | ||
@@ -1630,9 +1597,6 @@ static int resize_stripes(struct r5conf *conf, int newsize) | |||
1630 | break; | 1597 | break; |
1631 | 1598 | ||
1632 | nsh->raid_conf = conf; | 1599 | nsh->raid_conf = conf; |
1633 | #ifdef CONFIG_MULTICORE_RAID456 | ||
1634 | init_waitqueue_head(&nsh->ops.wait_for_ops); | ||
1635 | #endif | ||
1636 | spin_lock_init(&nsh->stripe_lock); | 1600 | spin_lock_init(&nsh->stripe_lock); |
1637 | 1601 | ||
1638 | list_add(&nsh->lru, &newstripes); | 1602 | list_add(&nsh->lru, &newstripes); |