Dan Williams
91c0092484
md: raid5_run_ops - run stripe operations outside sh->lock
...
When the raid acceleration work was proposed, Neil laid out the following
attack plan:
1/ move the xor and copy operations outside spin_lock(&sh->lock)
2/ find/implement an asynchronous offload api
The raid5_run_ops routine uses the asynchronous offload api (async_tx) and
the stripe_operations member of a stripe_head to carry out xor+copy
operations asynchronously, outside the lock.
To perform operations outside the lock a new set of state flags is needed
to track new requests, in-flight requests, and completed requests. In this
new model handle_stripe is tasked with scanning the stripe_head for work,
updating the stripe_operations structure, and finally dropping the lock and
calling raid5_run_ops for processing. The following flags outline the
requests that handle_stripe can make of raid5_run_ops:
STRIPE_OP_BIOFILL
- copy data into request buffers to satisfy a read request
STRIPE_OP_COMPUTE_BLK
- generate a missing block in the cache from the other blocks
STRIPE_OP_PREXOR
- subtract existing data as part of the read-modify-write process
STRIPE_OP_BIODRAIN
- copy data out of request buffers to satisfy a write request
STRIPE_OP_POSTXOR
- recalculate parity for new data that has entered the cache
STRIPE_OP_CHECK
- verify that the parity is correct
STRIPE_OP_IO
- submit i/o to the member disks (note this was already performed outside
the stripe lock, but it made sense to add it as an operation type
The flow is:
1/ handle_stripe sets STRIPE_OP_* in sh->ops.pending
2/ raid5_run_ops reads sh->ops.pending, sets sh->ops.ack, and submits the
operation to the async_tx api
3/ async_tx triggers the completion callback routine to set
sh->ops.complete and release the stripe
4/ handle_stripe runs again to finish the operation and optionally submit
new operations that were previously blocked
Note this patch just defines raid5_run_ops, subsequent commits (one per
major operation type) modify handle_stripe to take advantage of this
routine.
Changelog:
* removed ops_complete_biodrain in favor of ops_complete_postxor and
ops_complete_write.
* removed the raid5_run_ops workqueue
* call bi_end_io for reads in ops_complete_biofill, saves a call to
handle_stripe
* explicitly handle the 2-disk raid5 case (xor becomes memcpy), Neil Brown
* fix race between async engines and bi_end_io call for reads, Neil Brown
* remove unnecessary spin_lock from ops_complete_biofill
* remove test_and_set/test_and_clear BUG_ONs, Neil Brown
* remove explicit interrupt handling for channel switching, this feature
was absorbed (i.e. it is now implicit) by the async_tx api
* use return_io in ops_complete_biofill
Signed-off-by: Dan Williams <dan.j.williams@intel.com >
Acked-By: NeilBrown <neilb@suse.de >
2007-07-13 08:06:15 -07:00
..
2007-05-08 11:15:00 -07:00
2007-04-27 15:44:34 -03:00
2007-05-08 11:15:16 -07:00
2007-05-14 19:33:46 -04:00
2007-06-18 09:23:47 -07:00
2007-05-01 16:11:57 +02:00
2007-05-11 12:14:15 +01:00
2007-05-24 16:42:26 -07:00
2007-05-10 23:47:43 -07:00
2007-04-25 22:28:58 -07:00
2007-06-07 13:40:32 -07:00
2007-05-10 23:47:43 -07:00
2007-02-14 08:09:53 -08:00
2007-07-13 08:06:15 -07:00
2007-06-16 13:16:16 -07:00
2007-05-14 19:33:47 -04:00
2007-04-27 13:28:39 -07:00
2007-02-16 08:13:58 -08:00
2007-05-10 03:52:22 -04:00
2007-02-03 17:16:24 -05:00
2007-05-11 08:29:37 -07:00
2007-05-11 08:29:37 -07:00
2007-05-11 08:29:36 -07:00
2007-02-09 17:08:57 +00:00
2007-07-13 08:06:14 -07:00
2007-06-09 23:08:12 -04:00
2007-04-25 22:25:31 -07:00
2007-02-08 16:01:09 -08:00
2007-02-08 15:13:47 +00:00
2007-05-11 05:38:26 -04:00
2007-02-20 17:10:15 -08:00
2007-03-16 19:25:05 -07:00
2007-02-20 09:26:53 +00:00
2007-05-17 05:23:05 -07:00
2007-04-30 09:08:17 +02:00
2007-05-09 12:30:51 -07:00
2007-06-01 08:18:27 -07:00
2007-05-07 12:12:55 -07:00
2007-05-23 20:14:12 -07:00
2007-01-30 08:26:45 -08:00
2007-02-20 17:10:14 -08:00
2007-02-20 17:10:14 -08:00
2007-05-08 11:15:15 -07:00
2007-05-09 12:30:56 -07:00
2007-02-12 09:48:46 -08:00
2007-05-14 12:16:01 -07:00
2007-05-09 12:30:56 -07:00
2007-05-09 12:30:56 -07:00
2007-05-09 12:30:56 -07:00
2007-05-07 12:13:00 -07:00
2007-05-21 09:56:57 -07:00
2007-06-08 17:23:34 -07:00
2007-05-08 11:15:27 -07:00
2007-05-08 11:15:13 -07:00
2007-05-08 11:15:05 -07:00
2007-05-05 14:55:20 -07:00
2007-02-20 17:10:13 -08:00
2007-02-12 09:48:44 -08:00
2007-05-02 19:27:09 +02:00
2007-05-10 18:24:13 +02:00
2007-05-02 14:38:33 +10:00
2007-05-08 11:15:25 -07:00
2007-05-08 11:15:03 -07:00
2007-04-25 22:28:56 -07:00
2007-04-27 10:57:31 -07:00
2007-05-08 11:15:10 -07:00
2007-05-08 11:15:26 -07:00
2007-05-01 09:11:12 +01:00
2007-02-09 17:39:36 -05:00
2007-07-13 08:06:13 -07:00
2007-02-09 17:39:36 -05:00
2007-02-11 11:18:07 -08:00
2007-05-08 11:15:14 -07:00
2007-05-08 11:15:10 -07:00
2007-02-12 09:48:46 -08:00
2007-02-09 16:23:18 +00:00
2007-05-07 12:12:58 -07:00
2007-05-02 19:27:12 +02:00
2007-05-02 19:27:17 +02:00
2007-06-01 08:18:29 -07:00
2007-05-07 12:13:02 -07:00
2007-05-03 13:17:25 -07:00
2007-06-28 11:34:53 -07:00
2007-03-27 09:05:15 -07:00
2007-05-09 08:57:56 +02:00
2007-05-08 11:15:12 -07:00
2007-05-31 16:20:15 -04:00
2007-05-31 16:20:14 -04:00
2007-05-31 16:20:15 -04:00
2007-06-01 08:18:28 -07:00
2007-05-06 20:38:28 -04:00
2007-04-25 22:28:35 -07:00
2007-05-31 21:40:15 +02:00
2007-05-10 18:24:13 +02:00
2007-05-08 11:15:31 -07:00
2007-05-23 20:14:11 -07:00
2007-06-24 08:59:11 -07:00
2007-04-28 11:01:04 -04:00
2006-12-08 08:28:41 -08:00
2007-06-18 09:48:41 -07:00
2007-05-09 08:58:16 +02:00
2007-05-23 20:14:12 -07:00
2007-05-09 12:30:56 -07:00
2007-02-12 09:48:30 -08:00
2007-05-01 00:39:13 -04:00
2007-02-16 08:13:59 -08:00
2007-04-28 11:01:07 -04:00
2007-01-30 08:26:45 -08:00
2007-02-05 10:00:38 +01:00
2007-05-09 02:52:51 +02:00
2007-05-09 12:30:56 -07:00
2007-03-16 00:59:29 -04:00
2007-04-07 10:03:43 -07:00
2007-06-16 13:16:16 -07:00
2007-05-09 08:58:21 +02:00
2007-05-09 08:58:21 +02:00
2007-05-01 23:26:34 +02:00
2007-05-11 16:56:02 +02:00
2007-05-01 23:26:34 +02:00
2007-01-30 08:26:45 -08:00
2007-04-25 22:25:31 -07:00
2007-04-25 22:25:31 -07:00
2007-06-08 15:14:30 +02:00
2007-05-05 11:43:04 -07:00
2007-04-25 22:23:43 -07:00
2007-04-25 22:25:12 -07:00
2007-04-25 22:28:44 -07:00
2007-05-21 19:41:19 -04:00
2007-04-25 22:29:10 -07:00
2007-04-25 22:29:14 -07:00
2007-04-25 22:28:57 -07:00
2007-04-25 22:24:41 -07:00
2007-04-25 22:26:20 -07:00
2007-04-25 22:25:31 -07:00
2007-04-25 22:29:57 -07:00
2007-04-25 22:29:10 -07:00
2007-06-22 17:04:27 -07:00
2007-05-11 08:29:36 -07:00
2007-05-19 09:11:58 +02:00
2007-04-29 23:42:45 -04:00
2007-06-29 01:10:54 -04:00
2007-05-11 08:29:34 -07:00
2007-05-15 08:54:00 -07:00
2007-04-28 14:15:59 -04:00
2007-04-25 22:25:31 -07:00
2007-05-08 11:15:00 -07:00
2007-05-31 01:23:36 -07:00
2007-05-09 08:58:21 +02:00
2007-05-08 11:15:09 -07:00
2007-05-08 11:15:16 -07:00
2007-04-25 22:25:52 -07:00
2007-02-16 08:13:56 -08:00
2007-07-07 13:49:51 -07:00
2007-03-16 19:25:05 -07:00
2007-05-31 21:40:15 +02:00
2007-05-08 11:15:04 -07:00
2007-04-04 21:12:47 -07:00
2007-06-08 17:23:34 -07:00
2007-05-08 11:15:07 -07:00
2007-04-26 15:46:23 -07:00
2007-02-11 10:51:32 -08:00
2007-05-17 05:23:04 -07:00
2007-02-23 14:54:57 -08:00
2007-05-02 18:57:59 -07:00
2007-05-08 11:15:19 -07:00
2007-02-20 17:10:14 -08:00
2007-05-09 12:30:53 -07:00
2007-06-15 15:08:43 -07:00
2007-03-04 11:12:40 +02:00
2007-05-03 10:52:32 +03:00
2007-02-20 09:26:53 +00:00
2007-06-27 02:50:08 -04:00
2007-05-12 18:11:06 -07:00
2007-03-22 19:39:06 -07:00
2007-05-18 20:46:30 -07:00
2007-05-08 11:15:07 -07:00
2007-05-11 08:29:36 -07:00
2007-05-14 18:51:43 +02:00
2007-05-08 11:15:18 -07:00
2007-05-09 12:30:49 -07:00
2007-05-09 08:58:21 +02:00
2007-05-07 12:12:57 -07:00
2007-05-17 14:20:29 -07:00
2007-02-20 17:10:13 -08:00
2007-05-03 10:52:22 +03:00
2007-02-11 10:51:17 -08:00
2007-05-10 09:26:52 -07:00
2007-06-21 15:55:12 -07:00
2007-05-09 12:30:56 -07:00
2007-05-08 11:15:00 -07:00
2007-05-02 20:58:08 +02:00
2007-05-11 08:29:35 -07:00
2007-02-19 13:29:02 -08:00
2007-05-09 07:14:03 +02:00
2007-05-11 08:29:35 -07:00
2007-05-08 11:15:13 -07:00
2007-05-02 19:02:38 -07:00
2007-05-09 12:30:49 -07:00
2007-03-06 06:14:54 -05:00
2007-04-27 10:57:33 -07:00
2007-03-06 13:26:27 +01:00
2007-02-12 09:48:46 -08:00
2007-04-26 15:48:28 -07:00
2007-05-31 01:23:35 -07:00
2007-05-03 03:36:16 -07:00
2007-04-25 22:27:45 -07:00
2007-05-05 11:42:03 -07:00
2007-05-09 12:30:54 -07:00
2007-05-14 19:33:45 -04:00
2007-05-08 11:15:21 -07:00
2007-04-30 22:17:07 -07:00
2007-04-30 22:17:16 -07:00
2007-05-24 10:44:20 -04:00
2007-02-12 22:43:25 -08:00
2007-04-25 22:29:41 -07:00
2007-02-13 13:26:24 +01:00
2007-02-20 17:10:13 -08:00
2007-05-09 12:30:56 -07:00
2007-05-08 11:15:00 -07:00
2007-05-04 17:59:07 -07:00
2007-05-07 12:12:59 -07:00
2007-05-08 11:14:57 -07:00
2007-05-08 11:15:05 -07:00
2007-05-08 11:15:05 -07:00
2007-05-05 14:15:32 -07:00
2007-05-02 18:57:59 -07:00
2007-07-08 15:21:58 +02:00
2007-03-12 16:31:50 -07:00
2007-07-01 12:29:44 -07:00
2007-05-02 19:27:11 +02:00
2007-02-08 15:25:18 -08:00
2007-05-08 11:15:14 -07:00
2007-02-12 09:48:46 -08:00
2007-04-28 11:01:04 -04:00
2007-05-08 11:15:00 -07:00
2007-05-11 08:29:35 -07:00
2007-06-08 08:33:53 +02:00
2007-04-17 16:36:26 -07:00
2007-07-01 12:29:44 -07:00
2007-05-10 21:28:13 +10:00
2007-05-08 11:15:23 -07:00
2007-05-08 11:14:57 -07:00
2007-05-08 11:15:01 -07:00
2007-02-12 09:48:46 -08:00
2007-05-07 12:12:54 -07:00
2007-05-08 11:15:15 -07:00
2007-05-08 11:15:05 -07:00
2007-05-09 08:57:56 +02:00
2007-02-12 09:48:44 -08:00
2007-05-08 11:15:00 -07:00
2007-02-12 09:48:46 -08:00
2007-02-11 11:18:05 -08:00
2007-05-09 12:30:51 -07:00
2007-06-07 13:39:34 -07:00
2007-02-11 11:18:07 -08:00
2007-05-17 05:23:06 -07:00
2007-05-02 11:56:33 +01:00
2007-05-08 11:15:18 -07:00
2007-04-25 22:27:04 -07:00
2007-04-26 15:48:28 -07:00
2007-06-08 17:23:34 -07:00
2007-04-25 22:25:31 -07:00
2007-05-09 08:57:56 +02:00
2007-04-27 10:44:42 -07:00
2007-06-01 08:18:29 -07:00
2007-02-14 08:09:52 -08:00
2007-05-07 12:12:50 -07:00
2007-02-18 01:40:30 -05:00
2007-03-01 17:18:39 -08:00
2007-05-11 08:29:36 -07:00
2007-05-11 08:29:36 -07:00
2007-06-15 15:08:43 -07:00
2007-05-17 05:23:03 -07:00
2007-06-24 08:59:12 -07:00
2007-06-16 13:16:16 -07:00
2007-06-24 08:59:11 -07:00
2007-02-20 17:10:14 -08:00
2007-05-21 21:47:27 -07:00
2007-05-17 05:23:04 -07:00
2007-04-30 00:58:19 -07:00
2007-04-26 15:48:28 -07:00
2007-04-28 22:06:01 -04:00
2007-05-09 08:58:21 +02:00
2007-05-08 11:15:11 -07:00
2007-03-05 07:57:53 -08:00
2007-05-08 11:14:58 -07:00
2007-05-08 11:15:18 -07:00
2007-04-26 01:54:39 -07:00
2007-05-09 12:56:01 -07:00
2007-05-09 12:30:57 -07:00
2007-02-11 10:51:18 -08:00
2007-02-20 17:10:13 -08:00
2007-05-11 08:29:34 -07:00
2007-06-28 11:38:30 -07:00
2007-04-25 22:28:57 -07:00
2007-05-08 11:15:05 -07:00
2007-04-27 10:57:32 -07:00
2007-05-21 09:18:19 -07:00
2007-04-24 08:23:08 -07:00
2007-02-09 16:23:15 +00:00
2007-04-25 22:25:31 -07:00
2007-02-16 08:13:59 -08:00
2007-05-08 22:41:47 +02:00
2007-05-08 11:15:18 -07:00
2007-05-29 18:11:10 -07:00
2007-05-11 08:29:36 -07:00
2007-02-16 08:13:56 -08:00
2007-03-05 07:57:51 -08:00
2007-02-12 09:48:42 -08:00
2007-05-11 08:29:35 -07:00
2007-05-11 08:29:35 -07:00
2007-05-08 11:15:04 -07:00
2007-04-25 22:25:31 -07:00
2007-02-12 09:48:40 -08:00
2007-02-12 09:48:30 -08:00
2007-03-16 19:25:03 -07:00
2007-05-03 00:55:34 -04:00
2007-02-07 15:44:32 -08:00
2007-05-07 12:12:58 -07:00
2007-02-16 15:32:19 -08:00
2007-05-09 08:57:56 +02:00
2007-02-16 15:32:20 -08:00
2007-05-08 11:15:00 -07:00
2007-06-08 08:21:15 -03:00
2007-05-08 11:15:04 -07:00
2007-05-09 12:30:56 -07:00
2007-05-08 11:15:33 -07:00
2007-02-08 12:38:54 -08:00
2007-04-28 11:01:01 -04:00
2007-05-18 08:17:17 -07:00
2007-05-21 09:18:19 -07:00
2007-02-11 11:18:05 -08:00
2007-05-04 12:55:39 -07:00